/* Generated by Cython 0.29.21 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h",
            "/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/arrayscalars.h",
            "/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h",
            "/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h",
            "/usr/local/lib/python3.9/site-packages/numpy/core/include/numpy/ufuncobject.h"
        ],
        "include_dirs": [
            ".",
            "/usr/local/lib/python3.9/site-packages/numpy/core/include"
        ],
        "name": "pyqcstrc.icosah.intsct",
        "sources": [
            "pyqcstrc/icosah/intsct.pyx"
        ]
    },
    "module_name": "pyqcstrc.icosah.intsct"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_21"
#define CYTHON_HEX_VERSION 0x001D15F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 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_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #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
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(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
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(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
    #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_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #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(__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_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# 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 int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef 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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#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_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#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 METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#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_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#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 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 CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#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 >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         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, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #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) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (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] = 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 && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#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
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_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_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#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 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
#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   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#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(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#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; }

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

#define __PYX_HAVE__pyqcstrc__icosah__intsct
#define __PYX_HAVE_API__pyqcstrc__icosah__intsct
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

    /* NumPy API declarations from "numpy/__init__.pxd" */
    
#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 const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#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_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __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)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#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
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
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] = 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
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; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
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)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "pyqcstrc/icosah/intsct.pyx",
  "__init__.pxd",
  "type.pxd",
};
/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;


/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":690
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":691
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":692
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":693
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":697
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":698
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":699
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":700
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":704
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":705
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":714
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":715
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":716
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":718
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":719
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":720
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":722
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":723
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":725
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":726
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":727
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;

/* "pyqcstrc/icosah/math1.pxd":7
 * cimport numpy as np
 * 
 * ctypedef np.float64_t DTYPE_double_t             # <<<<<<<<<<<<<<
 * ctypedef long DTYPE_int_t
 * 
 */
typedef __pyx_t_5numpy_float64_t __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_double_t;

/* "pyqcstrc/icosah/math1.pxd":8
 * 
 * ctypedef np.float64_t DTYPE_double_t
 * ctypedef long DTYPE_int_t             # <<<<<<<<<<<<<<
 * 
 * cpdef list projection(np.ndarray[DTYPE_int_t, ndim=1],
 */
typedef long __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t;

/* "pyqcstrc/icosah/numericalc.pxd":7
 * cimport numpy as np
 * 
 * ctypedef np.float64_t DTYPE_double_t             # <<<<<<<<<<<<<<
 * ctypedef long DTYPE_int_t
 * 
 */
typedef __pyx_t_5numpy_float64_t __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t;

/* "pyqcstrc/icosah/numericalc.pxd":8
 * 
 * ctypedef np.float64_t DTYPE_double_t
 * ctypedef long DTYPE_int_t             # <<<<<<<<<<<<<<
 * 
 * cpdef int point_on_segment(np.ndarray[DTYPE_int_t, ndim=2] point,
 */
typedef long __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_int_t;

/* "pyqcstrc/icosah/utils.pxd":7
 * cimport numpy as np
 * 
 * ctypedef np.float64_t DTYPE_double_t             # <<<<<<<<<<<<<<
 * ctypedef long DTYPE_int_t
 * 
 */
typedef __pyx_t_5numpy_float64_t __pyx_t_8pyqcstrc_6icosah_5utils_DTYPE_double_t;

/* "pyqcstrc/icosah/utils.pxd":8
 * 
 * ctypedef np.float64_t DTYPE_double_t
 * ctypedef long DTYPE_int_t             # <<<<<<<<<<<<<<
 * 
 * cpdef int equivalent_triangle(np.ndarray[DTYPE_int_t, ndim=1],
 */
typedef long __pyx_t_8pyqcstrc_6icosah_5utils_DTYPE_int_t;

/* "pyqcstrc/icosah/intsct.pxd":7
 * cimport numpy as np
 * 
 * ctypedef np.float64_t DTYPE_double_t             # <<<<<<<<<<<<<<
 * ctypedef long DTYPE_int_t
 * 
 */
typedef __pyx_t_5numpy_float64_t __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t;

/* "pyqcstrc/icosah/intsct.pxd":8
 * 
 * ctypedef np.float64_t DTYPE_double_t
 * ctypedef long DTYPE_int_t             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray intersection_two_obj(np.ndarray[DTYPE_int_t, ndim=4],
 */
typedef long __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":729
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":730
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":731
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":733
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#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)

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

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

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* BufferGetAndValidate.proto */
#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
    ((obj == Py_None || obj == NULL) ?\
    (__Pyx_ZeroBuffer(buf), 0) :\
    __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static void __Pyx_ZeroBuffer(Py_buffer* buf);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };

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

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

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

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  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
#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

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

/* 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)  {\
    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);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
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
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, 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
  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

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

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

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

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

/* PyIntFromDouble.proto */
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value);
#else
#define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value)
#endif

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

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

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

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_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);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

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

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

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

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

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

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

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

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

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

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

/* 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);
        PyList_SET_ITEM(list, len, x);
        __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

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

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

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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

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

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

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#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

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

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

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

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


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

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

/* 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
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #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

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

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(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_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_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

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

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

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


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

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

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

/* Module declarations from '__builtin__' */

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

/* Module declarations from 'cpython' */

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

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

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

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
static PyTypeObject *__pyx_ptype_5numpy_number = 0;
static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
static PyTypeObject *__pyx_ptype_5numpy_character = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;

/* Module declarations from 'cython' */

/* Module declarations from 'pyqcstrc.icosah.math1' */
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_projection)(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static int (*__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_det_matrix)(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_dot_product)(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_centroid)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_add)(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_sub)(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_mul)(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_div)(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pyqcstrc.icosah.numericalc' */
static double (*__pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static double (*__pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static int (*__pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron)(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pyqcstrc.icosah.utils' */
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1)(PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge)(PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pyqcstrc.icosah.intsct' */
static __pyx_t_5numpy_float64_t __pyx_v_8pyqcstrc_6icosah_6intsct_TAU;
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj(PyArrayObject *, PyArrayObject *, int, int, int, int, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_1(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_line_segment_triangle(PyArrayObject *, PyArrayObject *, int); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_tetrahedron(PyArrayObject *, double, PyArrayObject *); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_tetrahedron_obj(PyArrayObject *, PyArrayObject *, double); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_obj(PyArrayObject *, PyArrayObject *); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_segment_surface(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_segment(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_6intsct_decomposition(PyArrayObject *); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_centroid_obj(PyArrayObject *); /*proto*/
static double __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius(PyArrayObject *, PyArrayObject *); /*proto*/
static double __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius_obj(PyArrayObject *, PyArrayObject *); /*proto*/
static double __pyx_f_8pyqcstrc_6icosah_6intsct_distance_in_perp_space(PyArrayObject *, PyArrayObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t = { "DTYPE_int_t", NULL, sizeof(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t = { "DTYPE_double_t", NULL, sizeof(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t), { 0 }, 0, 'R', 0, 0 };
#define __Pyx_MODULE_NAME "pyqcstrc.icosah.intsct"
extern int __pyx_module_is_main_pyqcstrc__icosah__intsct;
int __pyx_module_is_main_pyqcstrc__icosah__intsct = 0;

/* Implementation of 'pyqcstrc.icosah.intsct' */
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_d[] = "d";
static const char __pyx_k_2d[] = "2d";
static const char __pyx_k__5[] = " ";
static const char __pyx_k__6[] = " (";
static const char __pyx_k__7[] = ")";
static const char __pyx_k__8[] = "                   = ";
static const char __pyx_k__9[] = "      ";
static const char __pyx_k_np[] = "np";
static const char __pyx_k__12[] = "       ";
static const char __pyx_k__21[] = "            ";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_8_6f[] = "8.6f";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_obj1[] = "obj1";
static const char __pyx_k_obj2[] = "obj2";
static const char __pyx_k_sqrt[] = "sqrt";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_10_8f[] = "10.8f";
static const char __pyx_k_Total[] = "            -> Total : ";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_dummy[] = "dummy";
static const char __pyx_k_flag1[] = "flag1";
static const char __pyx_k_flag2[] = "flag2";
static const char __pyx_k_flag3[] = "flag3";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_point[] = "point";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_z1_z2[] = "           z1,z2 = ";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_points[] = "points";
static const char __pyx_k_s_8_6f[] = "                           s = %8.6f";
static const char __pyx_k_t_8_6f[] = "                           t = %8.6f";
static const char __pyx_k_tolist[] = "tolist";
static const char __pyx_k_volume[] = "              volume, ";
static const char __pyx_k_float64[] = "float64";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_Delaunay[] = "Delaunay";
static const char __pyx_k_DTYPE_int[] = "DTYPE_int";
static const char __pyx_k_ddx1_ddx2[] = "           ddx1,ddx2 = ";
static const char __pyx_k_ddy1_ddy2[] = "           ddy1,ddy2 = ";
static const char __pyx_k_ddz1_ddz2[] = "           ddz1,ddz2 = ";
static const char __pyx_k_segment_1[] = "           segment_1";
static const char __pyx_k_segment_2[] = "           segment_2";
static const char __pyx_k_simplices[] = "simplices";
static const char __pyx_k_common_obj[] = "        common obj, ";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_common_part[] = "                 common part, ";
static const char __pyx_k_obj1_volume[] = "      obj1, volume = ";
static const char __pyx_k_obj2_volume[] = "      obj2, volume = ";
static const char __pyx_k_tetrahedron[] = "       tetrahedron, ";
static const char __pyx_k_DTYPE_double[] = "DTYPE_double";
static const char __pyx_k_Total_volume[] = "                 Total volume : ";
static const char __pyx_k_common_part_2[] = "        common part, ";
static const char __pyx_k_scipy_spatial[] = "scipy.spatial";
static const char __pyx_k_tetrahedron_1[] = "tetrahedron_1";
static const char __pyx_k_tetrahedron_2[] = "tetrahedron";
static const char __pyx_k_th_tet_volume[] = "-th tet, volume : ";
static const char __pyx_k_N_of_points_3d[] = "            N of points: %3d :";
static const char __pyx_k_d_th_tet_empty[] = "            %d-th tet, empty";
static const char __pyx_k_out_of_expected[] = ") out of expected!";
static const char __pyx_k_tetrahedron_2_2[] = "tetrahedron_2";
static const char __pyx_k_common_obj_volume[] = "      common obj, volume = ";
static const char __pyx_k_common_part_all_1[] = "                 common part (all_1), ";
static const char __pyx_k_common_part_all_2[] = "                 common part (all_2), ";
static const char __pyx_k_common_part_empty[] = "                 common part, empty";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_common_part_volume[] = "        common part, volume = ";
static const char __pyx_k_intersecting_point[] = "intersecting_point";
static const char __pyx_k_tetrahedralization[] = "           tetrahedralization()";
static const char __pyx_k_Intersectiong_point[] = "          Intersectiong point:";
static const char __pyx_k_N_of_tetrahedron_3d[] = "            -> N of tetrahedron: %3d";
static const char __pyx_k_common_part_all_1_2[] = "        common part (all_1), ";
static const char __pyx_k_common_part_empty_2[] = "        common part, empty";
static const char __pyx_k_numbre_of_points_3d[] = "            numbre of points: %3d :";
static const char __pyx_k_intersection_two_obj[] = "     intersection_two_obj()";
static const char __pyx_k_tetrahedralization_1[] = "    tetrahedralization_1()";
static const char __pyx_k_common_part_partial_1[] = "                 common part (partial_1), ";
static const char __pyx_k_common_part_partial_2[] = "                 common part (partial_2), ";
static const char __pyx_k_common_part_partial_3[] = "                 common part (partial_3), ";
static const char __pyx_k_numerical_value_10_8f[] = "                 numerical value, %10.8f";
static const char __pyx_k_error_in_decomposition[] = "error in decomposition()";
static const char __pyx_k_th_tetrahedron_in_obj1[] = "-th tetrahedron in obj1, ";
static const char __pyx_k_th_tetrahedron_in_obj2[] = "-th tetrahedron in obj2, ";
static const char __pyx_k_volume_numerical_value[] = "              volume (numerical value)";
static const char __pyx_k_common_part_partial_1_2[] = "        common part (partial_1), ";
static const char __pyx_k_number_of_tetrahedron_d[] = "         -> number of tetrahedron,  %d";
static const char __pyx_k_numbre_of_tetrahedra_3d[] = "              -> numbre of tetrahedra: %3d:";
static const char __pyx_k_d_th_tetrahedron_in_obj1[] = "      %d-th tetrahedron in obj1";
static const char __pyx_k_intersection_two_segment[] = "           intersection_two_segment()";
static const char __pyx_k_added_point_is_inside_obj[] = "      added point is inside obj";
static const char __pyx_k_added_point_is_out_of_obj[] = "      added point is out of obj";
static const char __pyx_k_tetrahedralization_points[] = "           tetrahedralization_points()";
static const char __pyx_k_intersection_two_obj_convex[] = "     intersection_two_obj_convex";
static const char __pyx_k_intersection_segment_surface[] = "          intersection_segment_surface()";
static const char __pyx_k_volume_of_initial_tetrahedron[] = "      volume of initial tetrahedron: ";
static const char __pyx_k_intersection_tetrahedron_obj_4[] = "      intersection_tetrahedron_obj_4()";
static const char __pyx_k_intersection_two_tetrahedron_4[] = "        intersection_two_tetrahedron_4()";
static const char __pyx_k_intersection_using_tetrahedron[] = "      intersection_using_tetrahedron_4()";
static const char __pyx_k_line_segment_and_triangle_are_p[] = "          line segment and triangle are parallel";
static const char __pyx_k_number_of_points_for_tetrahedra[] = "         number of points for tetrahedralization, %d";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_rough_intersection_check_no_int[] = "      rough intersection check, no intersection, skip";
static const char __pyx_k_volume_of_initial_tetrahedron_2[] = "            volume of initial tetrahedron: ";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static PyObject *__pyx_kp_u_10_8f;
static PyObject *__pyx_kp_u_2d;
static PyObject *__pyx_kp_u_8_6f;
static PyObject *__pyx_n_s_DTYPE_double;
static PyObject *__pyx_n_s_DTYPE_int;
static PyObject *__pyx_n_s_Delaunay;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_u_Intersectiong_point;
static PyObject *__pyx_kp_u_N_of_points_3d;
static PyObject *__pyx_kp_u_N_of_tetrahedron_3d;
static PyObject *__pyx_kp_u_Total;
static PyObject *__pyx_kp_u_Total_volume;
static PyObject *__pyx_kp_u__12;
static PyObject *__pyx_kp_u__21;
static PyObject *__pyx_kp_u__5;
static PyObject *__pyx_kp_u__6;
static PyObject *__pyx_kp_u__7;
static PyObject *__pyx_kp_u__8;
static PyObject *__pyx_kp_u__9;
static PyObject *__pyx_kp_u_added_point_is_inside_obj;
static PyObject *__pyx_kp_u_added_point_is_out_of_obj;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_kp_u_common_obj;
static PyObject *__pyx_kp_u_common_obj_volume;
static PyObject *__pyx_kp_u_common_part;
static PyObject *__pyx_kp_u_common_part_2;
static PyObject *__pyx_kp_u_common_part_all_1;
static PyObject *__pyx_kp_u_common_part_all_1_2;
static PyObject *__pyx_kp_u_common_part_all_2;
static PyObject *__pyx_kp_u_common_part_empty;
static PyObject *__pyx_kp_u_common_part_empty_2;
static PyObject *__pyx_kp_u_common_part_partial_1;
static PyObject *__pyx_kp_u_common_part_partial_1_2;
static PyObject *__pyx_kp_u_common_part_partial_2;
static PyObject *__pyx_kp_u_common_part_partial_3;
static PyObject *__pyx_kp_u_common_part_volume;
static PyObject *__pyx_n_u_d;
static PyObject *__pyx_kp_u_d_th_tet_empty;
static PyObject *__pyx_kp_u_d_th_tetrahedron_in_obj1;
static PyObject *__pyx_kp_u_ddx1_ddx2;
static PyObject *__pyx_kp_u_ddy1_ddy2;
static PyObject *__pyx_kp_u_ddz1_ddz2;
static PyObject *__pyx_n_s_dummy;
static PyObject *__pyx_kp_u_error_in_decomposition;
static PyObject *__pyx_n_s_flag1;
static PyObject *__pyx_n_s_flag2;
static PyObject *__pyx_n_s_flag3;
static PyObject *__pyx_n_s_float64;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_intersecting_point;
static PyObject *__pyx_kp_u_intersection_segment_surface;
static PyObject *__pyx_kp_u_intersection_tetrahedron_obj_4;
static PyObject *__pyx_kp_u_intersection_two_obj;
static PyObject *__pyx_kp_u_intersection_two_obj_convex;
static PyObject *__pyx_kp_u_intersection_two_segment;
static PyObject *__pyx_kp_u_intersection_two_tetrahedron_4;
static PyObject *__pyx_kp_u_intersection_using_tetrahedron;
static PyObject *__pyx_kp_u_line_segment_and_triangle_are_p;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_kp_u_number_of_points_for_tetrahedra;
static PyObject *__pyx_kp_u_number_of_tetrahedron_d;
static PyObject *__pyx_kp_u_numbre_of_points_3d;
static PyObject *__pyx_kp_u_numbre_of_tetrahedra_3d;
static PyObject *__pyx_kp_u_numerical_value_10_8f;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_obj1;
static PyObject *__pyx_kp_u_obj1_volume;
static PyObject *__pyx_n_s_obj2;
static PyObject *__pyx_kp_u_obj2_volume;
static PyObject *__pyx_kp_u_out_of_expected;
static PyObject *__pyx_n_s_point;
static PyObject *__pyx_n_s_points;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_kp_u_rough_intersection_check_no_int;
static PyObject *__pyx_kp_u_s_8_6f;
static PyObject *__pyx_n_s_scipy_spatial;
static PyObject *__pyx_kp_u_segment_1;
static PyObject *__pyx_kp_u_segment_2;
static PyObject *__pyx_n_s_simplices;
static PyObject *__pyx_n_s_sqrt;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_kp_u_t_8_6f;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_tetrahedralization;
static PyObject *__pyx_kp_u_tetrahedralization_1;
static PyObject *__pyx_kp_u_tetrahedralization_points;
static PyObject *__pyx_kp_u_tetrahedron;
static PyObject *__pyx_n_s_tetrahedron_1;
static PyObject *__pyx_n_s_tetrahedron_2;
static PyObject *__pyx_n_s_tetrahedron_2_2;
static PyObject *__pyx_kp_u_th_tet_volume;
static PyObject *__pyx_kp_u_th_tetrahedron_in_obj1;
static PyObject *__pyx_kp_u_th_tetrahedron_in_obj2;
static PyObject *__pyx_n_s_tolist;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_kp_u_volume;
static PyObject *__pyx_kp_u_volume_numerical_value;
static PyObject *__pyx_kp_u_volume_of_initial_tetrahedron;
static PyObject *__pyx_kp_u_volume_of_initial_tetrahedron_2;
static PyObject *__pyx_kp_u_z1_z2;
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_2intersection_two_obj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_flag1, int __pyx_v_flag2, int __pyx_v_flag3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_4intersection_using_tetrahedron_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, int __pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_6intersection_tetrahedron_obj_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj, int __pyx_v_flag3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_8intersection_two_tetrahedron_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_10tetrahedralization_points(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_points, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_12tetrahedralization_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_point, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_14tetrahedralization(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_intersecting_point, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_float_2_0;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_18;
static PyObject *__pyx_int_72;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
/* Late includes */

/* "pyqcstrc/icosah/intsct.pyx":20
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0
 * 
 * cdef np.ndarray intersection_line_segment_triangle(np.ndarray[DTYPE_int_t, ndim=3] line_segment,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] triangle,
 *                                                     int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_line_segment_triangle(PyArrayObject *__pyx_v_line_segment, PyArrayObject *__pyx_v_triangle, int __pyx_v_verbose) {
  PyArrayObject *__pyx_v_p = 0;
  PyObject *__pyx_v_segment_1 = NULL;
  PyObject *__pyx_v_segment_2 = NULL;
  PyObject *__pyx_v_surface_1 = NULL;
  PyObject *__pyx_v_surface_2 = NULL;
  PyObject *__pyx_v_surface_3 = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_line_segment;
  __Pyx_Buffer __pyx_pybuffer_line_segment;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_p;
  __Pyx_Buffer __pyx_pybuffer_p;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_triangle;
  __Pyx_Buffer __pyx_pybuffer_triangle;
  PyArrayObject *__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("intersection_line_segment_triangle", 0);
  __pyx_pybuffer_p.pybuffer.buf = NULL;
  __pyx_pybuffer_p.refcount = 0;
  __pyx_pybuffernd_p.data = NULL;
  __pyx_pybuffernd_p.rcbuffer = &__pyx_pybuffer_p;
  __pyx_pybuffer_line_segment.pybuffer.buf = NULL;
  __pyx_pybuffer_line_segment.refcount = 0;
  __pyx_pybuffernd_line_segment.data = NULL;
  __pyx_pybuffernd_line_segment.rcbuffer = &__pyx_pybuffer_line_segment;
  __pyx_pybuffer_triangle.pybuffer.buf = NULL;
  __pyx_pybuffer_triangle.refcount = 0;
  __pyx_pybuffernd_triangle.data = NULL;
  __pyx_pybuffernd_triangle.rcbuffer = &__pyx_pybuffer_triangle;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_line_segment.rcbuffer->pybuffer, (PyObject*)__pyx_v_line_segment, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 20, __pyx_L1_error)
  }
  __pyx_pybuffernd_line_segment.diminfo[0].strides = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_line_segment.diminfo[0].shape = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_line_segment.diminfo[1].strides = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_line_segment.diminfo[1].shape = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_line_segment.diminfo[2].strides = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_line_segment.diminfo[2].shape = __pyx_pybuffernd_line_segment.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangle.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangle, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 20, __pyx_L1_error)
  }
  __pyx_pybuffernd_triangle.diminfo[0].strides = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangle.diminfo[0].shape = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triangle.diminfo[1].strides = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triangle.diminfo[1].shape = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triangle.diminfo[2].strides = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triangle.diminfo[2].shape = __pyx_pybuffernd_triangle.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/intsct.pyx":50
 *     # edges
 *     # triangle_1
 *     segment_1=line_segment[0]             # <<<<<<<<<<<<<<
 *     segment_2=line_segment[1]
 *     surface_1=triangle[0]
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_line_segment), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_segment_1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":51
 *     # triangle_1
 *     segment_1=line_segment[0]
 *     segment_2=line_segment[1]             # <<<<<<<<<<<<<<
 *     surface_1=triangle[0]
 *     surface_2=triangle[1]
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_line_segment), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_segment_2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":52
 *     segment_1=line_segment[0]
 *     segment_2=line_segment[1]
 *     surface_1=triangle[0]             # <<<<<<<<<<<<<<
 *     surface_2=triangle[1]
 *     surface_3=triangle[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_surface_1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":53
 *     segment_2=line_segment[1]
 *     surface_1=triangle[0]
 *     surface_2=triangle[1]             # <<<<<<<<<<<<<<
 *     surface_3=triangle[2]
 *     p=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose)
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_surface_2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":54
 *     surface_1=triangle[0]
 *     surface_2=triangle[1]
 *     surface_3=triangle[2]             # <<<<<<<<<<<<<<
 *     p=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose)
 *     return p
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_surface_3 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":55
 *     surface_2=triangle[1]
 *     surface_3=triangle[2]
 *     p=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose)             # <<<<<<<<<<<<<<
 *     return p
 * 
 */
  if (!(likely(((__pyx_v_segment_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 55, __pyx_L1_error)
  if (!(likely(((__pyx_v_segment_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 55, __pyx_L1_error)
  if (!(likely(((__pyx_v_surface_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 55, __pyx_L1_error)
  if (!(likely(((__pyx_v_surface_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 55, __pyx_L1_error)
  if (!(likely(((__pyx_v_surface_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 55, __pyx_L1_error)
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_segment_surface(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_1), ((PyArrayObject *)__pyx_v_surface_2), ((PyArrayObject *)__pyx_v_surface_3), __pyx_v_verbose)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_p, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
      __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0;
    }
    __pyx_pybuffernd_p.diminfo[0].strides = __pyx_pybuffernd_p.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p.diminfo[0].shape = __pyx_pybuffernd_p.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 55, __pyx_L1_error)
  }
  __pyx_v_p = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":56
 *     surface_3=triangle[2]
 *     p=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose)
 *     return p             # <<<<<<<<<<<<<<
 * 
 * cpdef list intersection_two_obj_convex(np.ndarray[DTYPE_int_t, ndim=4] obj1,
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_p));
  __pyx_r = ((PyArrayObject *)__pyx_v_p);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":20
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0
 * 
 * cdef np.ndarray intersection_line_segment_triangle(np.ndarray[DTYPE_int_t, ndim=3] line_segment,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] triangle,
 *                                                     int verbose):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangle.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_line_segment_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangle.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_segment_1);
  __Pyx_XDECREF(__pyx_v_segment_2);
  __Pyx_XDECREF(__pyx_v_surface_1);
  __Pyx_XDECREF(__pyx_v_surface_2);
  __Pyx_XDECREF(__pyx_v_surface_3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":58
 *     return p
 * 
 * cpdef list intersection_two_obj_convex(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                         int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_1intersection_two_obj_convex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_v_obj1_surf = 0;
  PyArrayObject *__pyx_v_obj2_surf = 0;
  PyArrayObject *__pyx_v_obj1_edge = 0;
  PyArrayObject *__pyx_v_obj2_edge = 0;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_num1;
  PyArrayObject *__pyx_v_p = 0;
  PyArrayObject *__pyx_v_tmp = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_point_tmp = 0;
  PyArrayObject *__pyx_v_tet = 0;
  PyArrayObject *__pyx_v_tr1 = 0;
  PyArrayObject *__pyx_v_tr2 = 0;
  PyArrayObject *__pyx_v_ed1 = 0;
  PyArrayObject *__pyx_v_ed2 = 0;
  PyArrayObject *__pyx_v_tmp3 = 0;
  PyArrayObject *__pyx_v_point_a = 0;
  PyArrayObject *__pyx_v_point_a1 = 0;
  PyArrayObject *__pyx_v_point_a2 = 0;
  PyArrayObject *__pyx_v_point_b = 0;
  PyArrayObject *__pyx_v_point_b1 = 0;
  PyArrayObject *__pyx_v_point_b2 = 0;
  PyArrayObject *__pyx_v_point = 0;
  PyArrayObject *__pyx_v_point1 = 0;
  PyArrayObject *__pyx_v_point_common = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ed1;
  __Pyx_Buffer __pyx_pybuffer_ed1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ed2;
  __Pyx_Buffer __pyx_pybuffer_ed2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1_edge;
  __Pyx_Buffer __pyx_pybuffer_obj1_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1_surf;
  __Pyx_Buffer __pyx_pybuffer_obj1_surf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2_edge;
  __Pyx_Buffer __pyx_pybuffer_obj2_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2_surf;
  __Pyx_Buffer __pyx_pybuffer_obj2_surf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_p;
  __Pyx_Buffer __pyx_pybuffer_p;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point;
  __Pyx_Buffer __pyx_pybuffer_point;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point1;
  __Pyx_Buffer __pyx_pybuffer_point1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_a;
  __Pyx_Buffer __pyx_pybuffer_point_a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_a1;
  __Pyx_Buffer __pyx_pybuffer_point_a1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_a2;
  __Pyx_Buffer __pyx_pybuffer_point_a2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_b;
  __Pyx_Buffer __pyx_pybuffer_point_b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_b1;
  __Pyx_Buffer __pyx_pybuffer_point_b1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_b2;
  __Pyx_Buffer __pyx_pybuffer_point_b2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_common;
  __Pyx_Buffer __pyx_pybuffer_point_common;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_tmp;
  __Pyx_Buffer __pyx_pybuffer_point_tmp;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tet;
  __Pyx_Buffer __pyx_pybuffer_tet;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp;
  __Pyx_Buffer __pyx_pybuffer_tmp;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3;
  __Pyx_Buffer __pyx_pybuffer_tmp3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr1;
  __Pyx_Buffer __pyx_pybuffer_tr1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr2;
  __Pyx_Buffer __pyx_pybuffer_tr2;
  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;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyArrayObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyArrayObject *__pyx_t_20 = NULL;
  PyArrayObject *__pyx_t_21 = NULL;
  PyArrayObject *__pyx_t_22 = NULL;
  PyArrayObject *__pyx_t_23 = NULL;
  PyArrayObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_two_obj_convex", 0);
  __pyx_pybuffer_obj1_surf.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1_surf.refcount = 0;
  __pyx_pybuffernd_obj1_surf.data = NULL;
  __pyx_pybuffernd_obj1_surf.rcbuffer = &__pyx_pybuffer_obj1_surf;
  __pyx_pybuffer_obj2_surf.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surf.refcount = 0;
  __pyx_pybuffernd_obj2_surf.data = NULL;
  __pyx_pybuffernd_obj2_surf.rcbuffer = &__pyx_pybuffer_obj2_surf;
  __pyx_pybuffer_obj1_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1_edge.refcount = 0;
  __pyx_pybuffernd_obj1_edge.data = NULL;
  __pyx_pybuffernd_obj1_edge.rcbuffer = &__pyx_pybuffer_obj1_edge;
  __pyx_pybuffer_obj2_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_edge.refcount = 0;
  __pyx_pybuffernd_obj2_edge.data = NULL;
  __pyx_pybuffernd_obj2_edge.rcbuffer = &__pyx_pybuffer_obj2_edge;
  __pyx_pybuffer_p.pybuffer.buf = NULL;
  __pyx_pybuffer_p.refcount = 0;
  __pyx_pybuffernd_p.data = NULL;
  __pyx_pybuffernd_p.rcbuffer = &__pyx_pybuffer_p;
  __pyx_pybuffer_tmp.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp.refcount = 0;
  __pyx_pybuffernd_tmp.data = NULL;
  __pyx_pybuffernd_tmp.rcbuffer = &__pyx_pybuffer_tmp;
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp1b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1b.refcount = 0;
  __pyx_pybuffernd_tmp1b.data = NULL;
  __pyx_pybuffernd_tmp1b.rcbuffer = &__pyx_pybuffer_tmp1b;
  __pyx_pybuffer_point_tmp.pybuffer.buf = NULL;
  __pyx_pybuffer_point_tmp.refcount = 0;
  __pyx_pybuffernd_point_tmp.data = NULL;
  __pyx_pybuffernd_point_tmp.rcbuffer = &__pyx_pybuffer_point_tmp;
  __pyx_pybuffer_tet.pybuffer.buf = NULL;
  __pyx_pybuffer_tet.refcount = 0;
  __pyx_pybuffernd_tet.data = NULL;
  __pyx_pybuffernd_tet.rcbuffer = &__pyx_pybuffer_tet;
  __pyx_pybuffer_tr1.pybuffer.buf = NULL;
  __pyx_pybuffer_tr1.refcount = 0;
  __pyx_pybuffernd_tr1.data = NULL;
  __pyx_pybuffernd_tr1.rcbuffer = &__pyx_pybuffer_tr1;
  __pyx_pybuffer_tr2.pybuffer.buf = NULL;
  __pyx_pybuffer_tr2.refcount = 0;
  __pyx_pybuffernd_tr2.data = NULL;
  __pyx_pybuffernd_tr2.rcbuffer = &__pyx_pybuffer_tr2;
  __pyx_pybuffer_ed1.pybuffer.buf = NULL;
  __pyx_pybuffer_ed1.refcount = 0;
  __pyx_pybuffernd_ed1.data = NULL;
  __pyx_pybuffernd_ed1.rcbuffer = &__pyx_pybuffer_ed1;
  __pyx_pybuffer_ed2.pybuffer.buf = NULL;
  __pyx_pybuffer_ed2.refcount = 0;
  __pyx_pybuffernd_ed2.data = NULL;
  __pyx_pybuffernd_ed2.rcbuffer = &__pyx_pybuffer_ed2;
  __pyx_pybuffer_tmp3.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3.refcount = 0;
  __pyx_pybuffernd_tmp3.data = NULL;
  __pyx_pybuffernd_tmp3.rcbuffer = &__pyx_pybuffer_tmp3;
  __pyx_pybuffer_point_a.pybuffer.buf = NULL;
  __pyx_pybuffer_point_a.refcount = 0;
  __pyx_pybuffernd_point_a.data = NULL;
  __pyx_pybuffernd_point_a.rcbuffer = &__pyx_pybuffer_point_a;
  __pyx_pybuffer_point_a1.pybuffer.buf = NULL;
  __pyx_pybuffer_point_a1.refcount = 0;
  __pyx_pybuffernd_point_a1.data = NULL;
  __pyx_pybuffernd_point_a1.rcbuffer = &__pyx_pybuffer_point_a1;
  __pyx_pybuffer_point_a2.pybuffer.buf = NULL;
  __pyx_pybuffer_point_a2.refcount = 0;
  __pyx_pybuffernd_point_a2.data = NULL;
  __pyx_pybuffernd_point_a2.rcbuffer = &__pyx_pybuffer_point_a2;
  __pyx_pybuffer_point_b.pybuffer.buf = NULL;
  __pyx_pybuffer_point_b.refcount = 0;
  __pyx_pybuffernd_point_b.data = NULL;
  __pyx_pybuffernd_point_b.rcbuffer = &__pyx_pybuffer_point_b;
  __pyx_pybuffer_point_b1.pybuffer.buf = NULL;
  __pyx_pybuffer_point_b1.refcount = 0;
  __pyx_pybuffernd_point_b1.data = NULL;
  __pyx_pybuffernd_point_b1.rcbuffer = &__pyx_pybuffer_point_b1;
  __pyx_pybuffer_point_b2.pybuffer.buf = NULL;
  __pyx_pybuffer_point_b2.refcount = 0;
  __pyx_pybuffernd_point_b2.data = NULL;
  __pyx_pybuffernd_point_b2.rcbuffer = &__pyx_pybuffer_point_b2;
  __pyx_pybuffer_point.pybuffer.buf = NULL;
  __pyx_pybuffer_point.refcount = 0;
  __pyx_pybuffernd_point.data = NULL;
  __pyx_pybuffernd_point.rcbuffer = &__pyx_pybuffer_point;
  __pyx_pybuffer_point1.pybuffer.buf = NULL;
  __pyx_pybuffer_point1.refcount = 0;
  __pyx_pybuffernd_point1.data = NULL;
  __pyx_pybuffernd_point1.rcbuffer = &__pyx_pybuffer_point1;
  __pyx_pybuffer_point_common.pybuffer.buf = NULL;
  __pyx_pybuffer_point_common.refcount = 0;
  __pyx_pybuffernd_point_common.data = NULL;
  __pyx_pybuffernd_point_common.rcbuffer = &__pyx_pybuffer_point_common;
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 58, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 58, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":78
 *     cdef list comb
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('     intersection_two_obj_convex')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":79
 * 
 *     if verbose>0:
 *         print('     intersection_two_obj_convex')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":78
 *     cdef list comb
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('     intersection_two_obj_convex')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":81
 *         print('     intersection_two_obj_convex')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     obj1_surf=generator_surface_1(obj1,verbose-1)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":83
 *         pass
 * 
 *     obj1_surf=generator_surface_1(obj1,verbose-1)             # <<<<<<<<<<<<<<
 *     obj2_surf=generator_surface_1(obj2,verbose-1)
 *     obj1_edge=generator_edge(obj1_surf,verbose-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj1), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1_surf, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      }
      __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
    }
    __pyx_pybuffernd_obj1_surf.diminfo[0].strides = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1_surf.diminfo[0].shape = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1_surf.diminfo[1].strides = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1_surf.diminfo[1].shape = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1_surf.diminfo[2].strides = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1_surf.diminfo[2].shape = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1_surf.diminfo[3].strides = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1_surf.diminfo[3].shape = __pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 83, __pyx_L1_error)
  }
  __pyx_v_obj1_surf = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":84
 * 
 *     obj1_surf=generator_surface_1(obj1,verbose-1)
 *     obj2_surf=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 *     obj1_edge=generator_edge(obj1_surf,verbose-1)
 *     obj2_edge=generator_edge(obj2_surf,verbose-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surf, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
      }
      __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
    }
    __pyx_pybuffernd_obj2_surf.diminfo[0].strides = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surf.diminfo[0].shape = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surf.diminfo[1].strides = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surf.diminfo[1].shape = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surf.diminfo[2].strides = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surf.diminfo[2].shape = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surf.diminfo[3].strides = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surf.diminfo[3].shape = __pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
  }
  __pyx_v_obj2_surf = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":85
 *     obj1_surf=generator_surface_1(obj1,verbose-1)
 *     obj2_surf=generator_surface_1(obj2,verbose-1)
 *     obj1_edge=generator_edge(obj1_surf,verbose-1)             # <<<<<<<<<<<<<<
 *     obj2_edge=generator_edge(obj2_surf,verbose-1)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge(((PyArrayObject *)__pyx_v_obj1_surf), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      }
      __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
    }
    __pyx_pybuffernd_obj1_edge.diminfo[0].strides = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1_edge.diminfo[0].shape = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1_edge.diminfo[1].strides = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1_edge.diminfo[1].shape = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1_edge.diminfo[2].strides = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1_edge.diminfo[2].shape = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1_edge.diminfo[3].strides = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1_edge.diminfo[3].shape = __pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
  }
  __pyx_v_obj1_edge = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":86
 *     obj2_surf=generator_surface_1(obj2,verbose-1)
 *     obj1_edge=generator_edge(obj1_surf,verbose-1)
 *     obj2_edge=generator_edge(obj2_surf,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     counter=0
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge(((PyArrayObject *)__pyx_v_obj2_surf), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
      }
      __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
    }
    __pyx_pybuffernd_obj2_edge.diminfo[0].strides = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_edge.diminfo[0].shape = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_edge.diminfo[1].strides = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_edge.diminfo[1].shape = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_edge.diminfo[2].strides = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_edge.diminfo[2].shape = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_edge.diminfo[3].strides = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_edge.diminfo[3].shape = __pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 86, __pyx_L1_error)
  }
  __pyx_v_obj2_edge = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":88
 *     obj2_edge=generator_edge(obj2_surf,verbose-1)
 * 
 *     counter=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1_surf)):
 *         tr1=obj1_surf[i1]
 */
  __pyx_v_counter = 0;

  /* "pyqcstrc/icosah/intsct.pyx":89
 * 
 *     counter=0
 *     for i1 in range(len(obj1_surf)):             # <<<<<<<<<<<<<<
 *         tr1=obj1_surf[i1]
 *         for i2 in range(len(obj2_edge)):
 */
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_obj1_surf)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_8; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/intsct.pyx":90
 *     counter=0
 *     for i1 in range(len(obj1_surf)):
 *         tr1=obj1_surf[i1]             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj2_edge)):
 *             ed2=obj2_edge[i2]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1_surf), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 90, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr1.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tr1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_tr1.diminfo[0].strides = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr1.diminfo[0].shape = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tr1.diminfo[1].strides = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tr1.diminfo[1].shape = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tr1.diminfo[2].strides = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tr1.diminfo[2].shape = __pyx_pybuffernd_tr1.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 90, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tr1, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":91
 *     for i1 in range(len(obj1_surf)):
 *         tr1=obj1_surf[i1]
 *         for i2 in range(len(obj2_edge)):             # <<<<<<<<<<<<<<
 *             ed2=obj2_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj2_edge)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 91, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_12; __pyx_t_10+=1) {
      __pyx_v_i2 = __pyx_t_10;

      /* "pyqcstrc/icosah/intsct.pyx":92
 *         tr1=obj1_surf[i1]
 *         for i2 in range(len(obj2_edge)):
 *             ed2=obj2_edge[i2]             # <<<<<<<<<<<<<<
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 *             if len(tmp)!=1:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2_edge), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 92, __pyx_L1_error)
      __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed2.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ed2.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ed2.rcbuffer->pybuffer, (PyObject*)__pyx_v_ed2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
          }
          __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
        }
        __pyx_pybuffernd_ed2.diminfo[0].strides = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ed2.diminfo[0].shape = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ed2.diminfo[1].strides = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ed2.diminfo[1].shape = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ed2.diminfo[2].strides = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ed2.diminfo[2].shape = __pyx_pybuffernd_ed2.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 92, __pyx_L1_error)
      }
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ed2, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":93
 *         for i2 in range(len(obj2_edge)):
 *             ed2=obj2_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)             # <<<<<<<<<<<<<<
 *             if len(tmp)!=1:
 *                 if counter==0:
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_line_segment_triangle(((PyArrayObject *)__pyx_v_ed2), ((PyArrayObject *)__pyx_v_tr1), (__pyx_v_verbose - 2))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
          }
          __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
        }
        __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 93, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":94
 *             ed2=obj2_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 *             if len(tmp)!=1:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     p=tmp
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 94, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":95
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 *             if len(tmp)!=1:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     p=tmp
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":96
 *             if len(tmp)!=1:
 *                 if counter==0:
 *                     p=tmp             # <<<<<<<<<<<<<<
 *                 else:
 *                     p=np.append(p,tmp)
 */
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_p, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_p.diminfo[0].strides = __pyx_pybuffernd_p.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p.diminfo[0].shape = __pyx_pybuffernd_p.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 96, __pyx_L1_error)
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
          __Pyx_XDECREF_SET(__pyx_v_p, __pyx_v_tmp);

          /* "pyqcstrc/icosah/intsct.pyx":95
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 *             if len(tmp)!=1:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     p=tmp
 *                 else:
 */
          goto __pyx_L9;
        }

        /* "pyqcstrc/icosah/intsct.pyx":98
 *                     p=tmp
 *                 else:
 *                     p=np.append(p,tmp)             # <<<<<<<<<<<<<<
 *                 counter+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 98, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_16, function);
              __pyx_t_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_p), ((PyObject *)__pyx_v_tmp)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_p), ((PyObject *)__pyx_v_tmp)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_17 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 98, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            if (__pyx_t_15) {
              __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_15); __pyx_t_15 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_p));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_p));
            PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_13, ((PyObject *)__pyx_v_p));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp));
            PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          }
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 98, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_p, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_p.diminfo[0].strides = __pyx_pybuffernd_p.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p.diminfo[0].shape = __pyx_pybuffernd_p.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 98, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_p, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L9:;

        /* "pyqcstrc/icosah/intsct.pyx":99
 *                 else:
 *                     p=np.append(p,tmp)
 *                 counter+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter = (__pyx_v_counter + 1);

        /* "pyqcstrc/icosah/intsct.pyx":94
 *             ed2=obj2_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed2,tr1,verbose-2)
 *             if len(tmp)!=1:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     p=tmp
 */
        goto __pyx_L8;
      }

      /* "pyqcstrc/icosah/intsct.pyx":101
 *                 counter+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj2_surf)):
 *         tr2=obj2_surf[i1]
 */
      /*else*/ {
      }
      __pyx_L8:;
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":102
 *             else:
 *                 pass
 *     for i1 in range(len(obj2_surf)):             # <<<<<<<<<<<<<<
 *         tr2=obj2_surf[i1]
 *         for i2 in range(len(obj1_edge)):
 */
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_obj2_surf)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 102, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_8; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/intsct.pyx":103
 *                 pass
 *     for i1 in range(len(obj2_surf)):
 *         tr2=obj2_surf[i1]             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj1_edge)):
 *             ed1=obj1_edge[i2]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2_surf), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 103, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr2.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr2.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr2.rcbuffer->pybuffer, (PyObject*)__pyx_v_tr2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_tr2.diminfo[0].strides = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr2.diminfo[0].shape = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tr2.diminfo[1].strides = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tr2.diminfo[1].shape = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tr2.diminfo[2].strides = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tr2.diminfo[2].shape = __pyx_pybuffernd_tr2.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tr2, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":104
 *     for i1 in range(len(obj2_surf)):
 *         tr2=obj2_surf[i1]
 *         for i2 in range(len(obj1_edge)):             # <<<<<<<<<<<<<<
 *             ed1=obj1_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1_edge)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 104, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_12; __pyx_t_10+=1) {
      __pyx_v_i2 = __pyx_t_10;

      /* "pyqcstrc/icosah/intsct.pyx":105
 *         tr2=obj2_surf[i1]
 *         for i2 in range(len(obj1_edge)):
 *             ed1=obj1_edge[i2]             # <<<<<<<<<<<<<<
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 *             if len(tmp)!=1:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1_edge), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 105, __pyx_L1_error)
      __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed1.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ed1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ed1.rcbuffer->pybuffer, (PyObject*)__pyx_v_ed1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
          }
          __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
        }
        __pyx_pybuffernd_ed1.diminfo[0].strides = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ed1.diminfo[0].shape = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ed1.diminfo[1].strides = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ed1.diminfo[1].shape = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ed1.diminfo[2].strides = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ed1.diminfo[2].shape = __pyx_pybuffernd_ed1.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
      }
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ed1, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":106
 *         for i2 in range(len(obj1_edge)):
 *             ed1=obj1_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)             # <<<<<<<<<<<<<<
 *             if len(tmp)!=1:
 *                 if counter==0:
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_line_segment_triangle(((PyArrayObject *)__pyx_v_ed1), ((PyArrayObject *)__pyx_v_tr2), (__pyx_v_verbose - 2))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
          }
          __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
        }
        __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":107
 *             ed1=obj1_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 *             if len(tmp)!=1:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     p=tmp
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 107, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":108
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 *             if len(tmp)!=1:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     p=tmp
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":109
 *             if len(tmp)!=1:
 *                 if counter==0:
 *                     p=tmp             # <<<<<<<<<<<<<<
 *                 else:
 *                     p=np.append(p,tmp)
 */
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_p, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_p.diminfo[0].strides = __pyx_pybuffernd_p.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p.diminfo[0].shape = __pyx_pybuffernd_p.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
          __Pyx_XDECREF_SET(__pyx_v_p, __pyx_v_tmp);

          /* "pyqcstrc/icosah/intsct.pyx":108
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 *             if len(tmp)!=1:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     p=tmp
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/intsct.pyx":111
 *                     p=tmp
 *                 else:
 *                     p=np.append(p,tmp)             # <<<<<<<<<<<<<<
 *                 counter+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_17, function);
              __pyx_t_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_17)) {
            PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_p), ((PyObject *)__pyx_v_tmp)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
            PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_p), ((PyObject *)__pyx_v_tmp)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 111, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__pyx_t_16) {
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __pyx_t_16 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_p));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_p));
            PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_13, ((PyObject *)__pyx_v_p));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp));
            PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 111, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p.rcbuffer->pybuffer, (PyObject*)__pyx_v_p, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_p.diminfo[0].strides = __pyx_pybuffernd_p.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p.diminfo[0].shape = __pyx_pybuffernd_p.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 111, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_p, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L15:;

        /* "pyqcstrc/icosah/intsct.pyx":112
 *                 else:
 *                     p=np.append(p,tmp)
 *                 counter+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter = (__pyx_v_counter + 1);

        /* "pyqcstrc/icosah/intsct.pyx":107
 *             ed1=obj1_edge[i2]
 *             tmp=intersection_line_segment_triangle(ed1,tr2,verbose-2)
 *             if len(tmp)!=1:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     p=tmp
 */
        goto __pyx_L14;
      }

      /* "pyqcstrc/icosah/intsct.pyx":114
 *                 counter+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *     if counter==0:
 *         return np.array([[[[0]]]])
 */
      /*else*/ {
      }
      __pyx_L14:;
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":115
 *             else:
 *                 pass
 *     if counter==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":116
 *                 pass
 *     if counter==0:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         point=p.reshape(int(len(p)/18),6,3) # 18=6*3
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_17, 0, __pyx_int_0);
    __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_16);
    PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_16);
    __pyx_t_16 = 0;
    __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    __pyx_t_2 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_17, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_16);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 116, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":115
 *             else:
 *                 pass
 *     if counter==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 *     else:
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":118
 *         return np.array([[[[0]]]])
 *     else:
 *         point=p.reshape(int(len(p)/18),6,3) # 18=6*3             # <<<<<<<<<<<<<<
 *         point1=remove_doubling_dim3_in_perp_space(point)
 *         #print(' dividing into three PODs:')
 */
  /*else*/ {
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_p), __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_p)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 118, __pyx_L1_error)
    __pyx_t_16 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_3, __pyx_t_16);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_16 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 118, __pyx_L1_error)
    __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point.diminfo[0].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point.diminfo[0].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point.diminfo[1].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point.diminfo[1].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point.diminfo[2].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point.diminfo[2].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 118, __pyx_L1_error)
    }
    __pyx_t_20 = 0;
    __pyx_v_point = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":119
 *     else:
 *         point=p.reshape(int(len(p)/18),6,3) # 18=6*3
 *         point1=remove_doubling_dim3_in_perp_space(point)             # <<<<<<<<<<<<<<
 *         #print(' dividing into three PODs:')
 *         #print('    Common   :     OD1 and     ODB')
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_point), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point1.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point1.rcbuffer->pybuffer, (PyObject*)__pyx_v_point1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point1.diminfo[0].strides = __pyx_pybuffernd_point1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point1.diminfo[0].shape = __pyx_pybuffernd_point1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point1.diminfo[1].strides = __pyx_pybuffernd_point1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point1.diminfo[1].shape = __pyx_pybuffernd_point1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point1.diminfo[2].strides = __pyx_pybuffernd_point1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point1.diminfo[2].shape = __pyx_pybuffernd_point1.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
    }
    __pyx_v_point1 = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":129
 *         #     Extract vertces of 2nd OD which are outsede 1st OD --> point_b2
 *         #
 *         counter1=0             # <<<<<<<<<<<<<<
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj1_surf) # generating vertces of 1st OD
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":130
 *         #
 *         counter1=0
 *         counter2=0             # <<<<<<<<<<<<<<
 *         tmp3=remove_doubling_dim4_in_perp_space(obj1_surf) # generating vertces of 1st OD
 *         for i1 in range(len(tmp3)):
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":131
 *         counter1=0
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj1_surf) # generating vertces of 1st OD             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space(((PyArrayObject *)__pyx_v_obj1_surf), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_tmp3.diminfo[0].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3.diminfo[0].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3.diminfo[1].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3.diminfo[1].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3.diminfo[2].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3.diminfo[2].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 131, __pyx_L1_error)
    }
    __pyx_v_tmp3 = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":132
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj1_surf) # generating vertces of 1st OD
 *         for i1 in range(len(tmp3)):             # <<<<<<<<<<<<<<
 *             point_tmp=tmp3[i1]
 *             counter=0
 */
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp3)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_8; __pyx_t_3+=1) {
      __pyx_v_i1 = __pyx_t_3;

      /* "pyqcstrc/icosah/intsct.pyx":133
 *         tmp3=remove_doubling_dim4_in_perp_space(obj1_surf) # generating vertces of 1st OD
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]             # <<<<<<<<<<<<<<
 *             counter=0
 *             for i2 in range(len(obj2)):
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 133, __pyx_L1_error)
      __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_10 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
          }
          __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
        }
        __pyx_pybuffernd_point_tmp.diminfo[0].strides = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_tmp.diminfo[0].shape = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_tmp.diminfo[1].strides = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_tmp.diminfo[1].shape = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 133, __pyx_L1_error)
      }
      __pyx_t_21 = 0;
      __Pyx_XDECREF_SET(__pyx_v_point_tmp, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":134
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]
 *             counter=0             # <<<<<<<<<<<<<<
 *             for i2 in range(len(obj2)):
 *                 tet=obj2[i2]
 */
      __pyx_v_counter = 0;

      /* "pyqcstrc/icosah/intsct.pyx":135
 *             point_tmp=tmp3[i1]
 *             counter=0
 *             for i2 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                 tet=obj2[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 */
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 135, __pyx_L1_error)
      __pyx_t_12 = __pyx_t_11;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_12; __pyx_t_10+=1) {
        __pyx_v_i2 = __pyx_t_10;

        /* "pyqcstrc/icosah/intsct.pyx":136
 *             counter=0
 *             for i2 in range(len(obj2)):
 *                 tet=obj2[i2]             # <<<<<<<<<<<<<<
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 136, __pyx_L1_error)
        __pyx_t_22 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tet.rcbuffer->pybuffer);
          __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tet.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_13 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tet.rcbuffer->pybuffer, (PyObject*)__pyx_v_tet, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
            }
            __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
          }
          __pyx_pybuffernd_tet.diminfo[0].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tet.diminfo[0].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tet.diminfo[1].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tet.diminfo[1].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tet.diminfo[2].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tet.diminfo[2].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[2];
          if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 136, __pyx_L1_error)
        }
        __pyx_t_22 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tet, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":137
 *             for i2 in range(len(obj2)):
 *                 tet=obj2[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])             # <<<<<<<<<<<<<<
 *                 if num1==0:
 *                     counter+=1
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 137, __pyx_L1_error)
        __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 137, __pyx_L1_error)
        __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 137, __pyx_L1_error)
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 137, __pyx_L1_error)
        __pyx_v_num1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_point_tmp), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_19), ((PyArrayObject *)__pyx_t_16), 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":138
 *                 tet=obj2[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:             # <<<<<<<<<<<<<<
 *                     counter+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_num1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":139
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:
 *                     counter+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter = (__pyx_v_counter + 1);

          /* "pyqcstrc/icosah/intsct.pyx":140
 *                 if num1==0:
 *                     counter+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L20_break;

          /* "pyqcstrc/icosah/intsct.pyx":138
 *                 tet=obj2[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:             # <<<<<<<<<<<<<<
 *                     counter+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/intsct.pyx":142
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter>0:
 *                 if counter1==0:
 */
        /*else*/ {
        }
      }
      __pyx_L20_break:;

      /* "pyqcstrc/icosah/intsct.pyx":143
 *                 else:
 *                     pass
 *             if counter>0:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 */
      __pyx_t_1 = ((__pyx_v_counter > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":144
 *                     pass
 *             if counter>0:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":145
 *             if counter>0:
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)
 */
          __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_point_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_15 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_19);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_19, function);
            }
          }
          __pyx_t_16 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_15, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 145, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":144
 *                     pass
 *             if counter>0:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 */
          goto __pyx_L23;
        }

        /* "pyqcstrc/icosah/intsct.pyx":147
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_np); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_append); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __pyx_t_19 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_19)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_19);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_15)) {
            PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 147, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
            PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 147, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_19) {
              __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __pyx_t_19 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_point_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_point_tmp));
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, ((PyObject *)__pyx_v_point_tmp));
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 147, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 147, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 147, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;
        }
        __pyx_L23:;

        /* "pyqcstrc/icosah/intsct.pyx":148
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 if counter2==0:
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/intsct.pyx":143
 *                 else:
 *                     pass
 *             if counter>0:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 */
        goto __pyx_L22;
      }

      /* "pyqcstrc/icosah/intsct.pyx":150
 *                 counter1+=1
 *             else:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":151
 *             else:
 *                 if counter2==0:
 *                     tmp1b=point_tmp.reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_point_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_16 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_2, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 151, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":150
 *                 counter1+=1
 *             else:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 */
          goto __pyx_L24;
        }

        /* "pyqcstrc/icosah/intsct.pyx":153
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *         point_a1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 153, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 153, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          {
            __pyx_t_19 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 153, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            if (__pyx_t_15) {
              __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_15); __pyx_t_15 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
            PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_INCREF(((PyObject *)__pyx_v_point_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_point_tmp));
            PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_10, ((PyObject *)__pyx_v_point_tmp));
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 153, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 153, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;
        }
        __pyx_L24:;

        /* "pyqcstrc/icosah/intsct.pyx":154
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *         point_a1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         point_b2=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);
      }
      __pyx_L22:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":155
 *                     tmp1b=np.append(tmp1b,point_tmp)
 *                 counter2+=1
 *         point_a1=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         point_b2=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         #
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_15 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_15) {
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_15); __pyx_t_15 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_3, __pyx_t_19);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_19 = 0;
      __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_t_23 = ((PyArrayObject *)__pyx_t_16);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a1.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point_a1.diminfo[0].strides = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_a1.diminfo[0].shape = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_a1.diminfo[1].strides = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_a1.diminfo[1].shape = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_a1.diminfo[2].strides = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_a1.diminfo[2].shape = __pyx_pybuffernd_point_a1.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
    }
    __pyx_t_23 = 0;
    __pyx_v_point_a1 = ((PyArrayObject *)__pyx_t_16);
    __pyx_t_16 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":156
 *                 counter2+=1
 *         point_a1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         point_b2=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *         #
 *         # (2) Extract vertces of 1st OD which are insede 2nd OD --> point_b1
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 156, __pyx_L1_error)
    __pyx_t_17 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_19 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_19)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_19);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_19) {
        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_19); __pyx_t_19 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, __pyx_t_17);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_17 = 0;
      __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 156, __pyx_L1_error)
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_16);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b2.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b2.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b2.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point_b2.diminfo[0].strides = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_b2.diminfo[0].shape = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_b2.diminfo[1].strides = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_b2.diminfo[1].shape = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_b2.diminfo[2].strides = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_b2.diminfo[2].shape = __pyx_pybuffernd_point_b2.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
    }
    __pyx_t_24 = 0;
    __pyx_v_point_b2 = ((PyArrayObject *)__pyx_t_16);
    __pyx_t_16 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":161
 *         #     Extract vertces of 1st OD which are outsede 2nd OD --> point_a2
 *         #
 *         counter1=0             # <<<<<<<<<<<<<<
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj2_surf) # generating vertces of 2nd OD
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":162
 *         #
 *         counter1=0
 *         counter2=0             # <<<<<<<<<<<<<<
 *         tmp3=remove_doubling_dim4_in_perp_space(obj2_surf) # generating vertces of 2nd OD
 *         for i1 in range(len(tmp3)):
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":163
 *         counter1=0
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj2_surf) # generating vertces of 2nd OD             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]
 */
    __pyx_t_16 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space(((PyArrayObject *)__pyx_v_obj2_surf), 0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_tmp3.diminfo[0].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3.diminfo[0].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3.diminfo[1].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3.diminfo[1].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3.diminfo[2].strides = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3.diminfo[2].shape = __pyx_pybuffernd_tmp3.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3, ((PyArrayObject *)__pyx_t_16));
    __pyx_t_16 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":164
 *         counter2=0
 *         tmp3=remove_doubling_dim4_in_perp_space(obj2_surf) # generating vertces of 2nd OD
 *         for i1 in range(len(tmp3)):             # <<<<<<<<<<<<<<
 *             point_tmp=tmp3[i1]
 *             counter=0
 */
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp3)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 164, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_8; __pyx_t_3+=1) {
      __pyx_v_i1 = __pyx_t_3;

      /* "pyqcstrc/icosah/intsct.pyx":165
 *         tmp3=remove_doubling_dim4_in_perp_space(obj2_surf) # generating vertces of 2nd OD
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]             # <<<<<<<<<<<<<<
 *             counter=0
 *             for i2 in range(len(obj1)):
 */
      __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 165, __pyx_L1_error)
      __pyx_t_21 = ((PyArrayObject *)__pyx_t_16);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_10 < 0)) {
          PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
          }
          __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
        }
        __pyx_pybuffernd_point_tmp.diminfo[0].strides = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_tmp.diminfo[0].shape = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_tmp.diminfo[1].strides = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_tmp.diminfo[1].shape = __pyx_pybuffernd_point_tmp.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
      }
      __pyx_t_21 = 0;
      __Pyx_XDECREF_SET(__pyx_v_point_tmp, ((PyArrayObject *)__pyx_t_16));
      __pyx_t_16 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":166
 *         for i1 in range(len(tmp3)):
 *             point_tmp=tmp3[i1]
 *             counter=0             # <<<<<<<<<<<<<<
 *             for i2 in range(len(obj1)):
 *                 tet=obj1[i2]
 */
      __pyx_v_counter = 0;

      /* "pyqcstrc/icosah/intsct.pyx":167
 *             point_tmp=tmp3[i1]
 *             counter=0
 *             for i2 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *                 tet=obj1[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 */
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 167, __pyx_L1_error)
      __pyx_t_12 = __pyx_t_11;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_12; __pyx_t_10+=1) {
        __pyx_v_i2 = __pyx_t_10;

        /* "pyqcstrc/icosah/intsct.pyx":168
 *             counter=0
 *             for i2 in range(len(obj1)):
 *                 tet=obj1[i2]             # <<<<<<<<<<<<<<
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:
 */
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 168, __pyx_L1_error)
        __pyx_t_22 = ((PyArrayObject *)__pyx_t_16);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tet.rcbuffer->pybuffer);
          __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tet.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_13 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tet.rcbuffer->pybuffer, (PyObject*)__pyx_v_tet, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
            }
            __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
          }
          __pyx_pybuffernd_tet.diminfo[0].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tet.diminfo[0].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tet.diminfo[1].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tet.diminfo[1].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tet.diminfo[2].strides = __pyx_pybuffernd_tet.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tet.diminfo[2].shape = __pyx_pybuffernd_tet.rcbuffer->pybuffer.shape[2];
          if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
        }
        __pyx_t_22 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tet, ((PyArrayObject *)__pyx_t_16));
        __pyx_t_16 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":169
 *             for i2 in range(len(obj1)):
 *                 tet=obj1[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])             # <<<<<<<<<<<<<<
 *                 if num1==0:
 *                     counter+=1
 */
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 169, __pyx_L1_error)
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 169, __pyx_L1_error)
        __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 169, __pyx_L1_error)
        __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tet), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 169, __pyx_L1_error)
        __pyx_v_num1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_point_tmp), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_17), 0);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":170
 *                 tet=obj1[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:             # <<<<<<<<<<<<<<
 *                     counter+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_num1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":171
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:
 *                     counter+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter = (__pyx_v_counter + 1);

          /* "pyqcstrc/icosah/intsct.pyx":172
 *                 if num1==0:
 *                     counter+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L28_break;

          /* "pyqcstrc/icosah/intsct.pyx":170
 *                 tet=obj1[i2]
 *                 num1=inside_outside_tetrahedron(point_tmp,tet[0],tet[1],tet[2],tet[3])
 *                 if num1==0:             # <<<<<<<<<<<<<<
 *                     counter+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/intsct.pyx":174
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter>0:
 *                 if counter1==0:
 */
        /*else*/ {
        }
      }
      __pyx_L28_break:;

      /* "pyqcstrc/icosah/intsct.pyx":175
 *                 else:
 *                     pass
 *             if counter>0:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 */
      __pyx_t_1 = ((__pyx_v_counter > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":176
 *                     pass
 *             if counter>0:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":177
 *             if counter>0:
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_point_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 177, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_17 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_2, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 177, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 177, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 177, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_17));
          __pyx_t_17 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":176
 *                     pass
 *             if counter>0:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 */
          goto __pyx_L31;
        }

        /* "pyqcstrc/icosah/intsct.pyx":179
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 179, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_17);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 179, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_17);
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 179, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            if (__pyx_t_15) {
              __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_point_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_point_tmp));
            PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_10, ((PyObject *)__pyx_v_point_tmp));
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 179, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 179, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 179, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_17));
          __pyx_t_17 = 0;
        }
        __pyx_L31:;

        /* "pyqcstrc/icosah/intsct.pyx":180
 *                 else:
 *                     tmp1a=np.append(tmp1a,point_tmp)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 if counter2==0:
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/intsct.pyx":175
 *                 else:
 *                     pass
 *             if counter>0:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=point_tmp.reshape(18) # 18=6*3
 */
        goto __pyx_L30;
      }

      /* "pyqcstrc/icosah/intsct.pyx":182
 *                 counter1+=1
 *             else:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":183
 *             else:
 *                 if counter2==0:
 *                     tmp1b=point_tmp.reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_point_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_17 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_16, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 183, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 183, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
              }
              __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 183, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_17));
          __pyx_t_17 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":182
 *                 counter1+=1
 *             else:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 */
          goto __pyx_L32;
        }

        /* "pyqcstrc/icosah/intsct.pyx":185
 *                     tmp1b=point_tmp.reshape(18)
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *         point_b1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_16);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_16, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_17);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_point_tmp)};
            __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_17);
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
            PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_INCREF(((PyObject *)__pyx_v_point_tmp));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_point_tmp));
            PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_10, ((PyObject *)__pyx_v_point_tmp));
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 185, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
              }
              __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_17));
          __pyx_t_17 = 0;
        }
        __pyx_L32:;

        /* "pyqcstrc/icosah/intsct.pyx":186
 *                 else:
 *                     tmp1b=np.append(tmp1b,point_tmp)
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *         point_b1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         point_a2=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);
      }
      __pyx_L30:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":187
 *                     tmp1b=np.append(tmp1b,point_tmp)
 *                 counter2+=1
 *         point_b1=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         point_a2=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         #
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 187, __pyx_L1_error)
    __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_15, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_15, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_3, __pyx_t_15);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_15 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_19, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 187, __pyx_L1_error)
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b1.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b1.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b1.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point_b1.diminfo[0].strides = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_b1.diminfo[0].shape = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_b1.diminfo[1].strides = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_b1.diminfo[1].shape = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_b1.diminfo[2].strides = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_b1.diminfo[2].shape = __pyx_pybuffernd_point_b1.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
    }
    __pyx_t_24 = 0;
    __pyx_v_point_b1 = ((PyArrayObject *)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":188
 *                 counter2+=1
 *         point_b1=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         point_a2=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *         #
 *         # (3) Sum point A, point B and Intersections --->>> common part
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_15 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_15) {
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_3, __pyx_t_19);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_19 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 188, __pyx_L1_error)
    __pyx_t_23 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a2.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point_a2.diminfo[0].strides = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_a2.diminfo[0].shape = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_a2.diminfo[1].strides = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_a2.diminfo[1].shape = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_a2.diminfo[2].strides = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_a2.diminfo[2].shape = __pyx_pybuffernd_point_a2.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
    }
    __pyx_t_23 = 0;
    __pyx_v_point_a2 = ((PyArrayObject *)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":193
 *         #
 *         # common part = point1 + point_a1 + point_b1
 *         tmp=np.append(point1,point_a1)             # <<<<<<<<<<<<<<
 *         tmp=np.append(tmp,point_b1)
 *         point_common=tmp.reshape(int(len(tmp)/18),6,3) # 18=6*3
 */
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_a1)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_a1)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_16) {
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_16); __pyx_t_16 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_point1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point1));
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_3, ((PyObject *)__pyx_v_point1));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_a1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_a1));
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_a1));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 193, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 193, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":194
 *         # common part = point1 + point_a1 + point_b1
 *         tmp=np.append(point1,point_a1)
 *         tmp=np.append(tmp,point_b1)             # <<<<<<<<<<<<<<
 *         point_common=tmp.reshape(int(len(tmp)/18),6,3) # 18=6*3
 *         point_common=remove_doubling_dim3_in_perp_space(point_common)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_19, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_b1)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_b1)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp));
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_3, ((PyObject *)__pyx_v_tmp));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_b1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b1));
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_b1));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 194, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":195
 *         tmp=np.append(point1,point_a1)
 *         tmp=np.append(tmp,point_b1)
 *         point_common=tmp.reshape(int(len(tmp)/18),6,3) # 18=6*3             # <<<<<<<<<<<<<<
 *         point_common=remove_doubling_dim3_in_perp_space(point_common)
 *         #
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 195, __pyx_L1_error)
    __pyx_t_16 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_19, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, __pyx_t_16);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_16 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_15, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 195, __pyx_L1_error)
    __pyx_t_20 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point_common.diminfo[0].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_common.diminfo[0].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_common.diminfo[1].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_common.diminfo[1].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_common.diminfo[2].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_common.diminfo[2].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
    }
    __pyx_t_20 = 0;
    __pyx_v_point_common = ((PyArrayObject *)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":196
 *         tmp=np.append(tmp,point_b1)
 *         point_common=tmp.reshape(int(len(tmp)/18),6,3) # 18=6*3
 *         point_common=remove_doubling_dim3_in_perp_space(point_common)             # <<<<<<<<<<<<<<
 *         #
 *         # point_a = point_a1 + point_a2 + point1
 */
    __pyx_t_17 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_point_common), 0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point_common.diminfo[0].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_common.diminfo[0].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_common.diminfo[1].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_common.diminfo[1].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_common.diminfo[2].strides = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_common.diminfo[2].shape = __pyx_pybuffernd_point_common.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_point_common, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":199
 *         #
 *         # point_a = point_a1 + point_a2 + point1
 *         tmp=np.append(point1,point_a1)             # <<<<<<<<<<<<<<
 *         tmp=np.append(tmp,point_a2)
 *         point_a=tmp.reshape(int(len(tmp)/18),6,3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_np); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_append); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_19)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_19);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_a1)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_a1)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_19) {
        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_19); __pyx_t_19 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_point1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point1));
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_3, ((PyObject *)__pyx_v_point1));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_a1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_a1));
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_a1));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 199, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 199, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":200
 *         # point_a = point_a1 + point_a2 + point1
 *         tmp=np.append(point1,point_a1)
 *         tmp=np.append(tmp,point_a2)             # <<<<<<<<<<<<<<
 *         point_a=tmp.reshape(int(len(tmp)/18),6,3)
 *         point_a=remove_doubling_dim3_in_perp_space(point_a)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_a2)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_a2)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_15) {
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_15); __pyx_t_15 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp));
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_3, ((PyObject *)__pyx_v_tmp));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_a2));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_a2));
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_a2));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_19, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 200, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 200, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":201
 *         tmp=np.append(point1,point_a1)
 *         tmp=np.append(tmp,point_a2)
 *         point_a=tmp.reshape(int(len(tmp)/18),6,3)             # <<<<<<<<<<<<<<
 *         point_a=remove_doubling_dim3_in_perp_space(point_a)
 *         #
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 201, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_15 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
      PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_19, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_15) {
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_3, __pyx_t_19);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_19 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 201, __pyx_L1_error)
    __pyx_t_23 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point_a.diminfo[0].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_a.diminfo[0].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_a.diminfo[1].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_a.diminfo[1].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_a.diminfo[2].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_a.diminfo[2].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
    }
    __pyx_t_23 = 0;
    __pyx_v_point_a = ((PyArrayObject *)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":202
 *         tmp=np.append(tmp,point_a2)
 *         point_a=tmp.reshape(int(len(tmp)/18),6,3)
 *         point_a=remove_doubling_dim3_in_perp_space(point_a)             # <<<<<<<<<<<<<<
 *         #
 *         # point_b = point_b1 + point_b2 + point1
 */
    __pyx_t_17 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_point_a), 0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point_a.diminfo[0].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_a.diminfo[0].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_a.diminfo[1].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_a.diminfo[1].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_a.diminfo[2].strides = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_a.diminfo[2].shape = __pyx_pybuffernd_point_a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 202, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_point_a, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":205
 *         #
 *         # point_b = point_b1 + point_b2 + point1
 *         tmp=np.append(point1,point_b1)             # <<<<<<<<<<<<<<
 *         tmp=np.append(tmp,point_b2)
 *         point_b=tmp.reshape(int(len(tmp)/18),6,3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_b1)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_point1), ((PyObject *)__pyx_v_point_b1)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_16) {
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_16); __pyx_t_16 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_point1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point1));
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_3, ((PyObject *)__pyx_v_point1));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_b1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b1));
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_b1));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 205, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":206
 *         # point_b = point_b1 + point_b2 + point1
 *         tmp=np.append(point1,point_b1)
 *         tmp=np.append(tmp,point_b2)             # <<<<<<<<<<<<<<
 *         point_b=tmp.reshape(int(len(tmp)/18),6,3)
 *         point_b=remove_doubling_dim3_in_perp_space(point_b)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_19, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_b2)};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp), ((PyObject *)__pyx_v_point_b2)};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp));
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_3, ((PyObject *)__pyx_v_tmp));
      __Pyx_INCREF(((PyObject *)__pyx_v_point_b2));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b2));
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_3, ((PyObject *)__pyx_v_point_b2));
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 206, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_tmp.diminfo[0].strides = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp.diminfo[0].shape = __pyx_pybuffernd_tmp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 206, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":207
 *         tmp=np.append(point1,point_b1)
 *         tmp=np.append(tmp,point_b2)
 *         point_b=tmp.reshape(int(len(tmp)/18),6,3)             # <<<<<<<<<<<<<<
 *         point_b=remove_doubling_dim3_in_perp_space(point_b)
 *         #
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp), __pyx_n_s_reshape); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 207, __pyx_L1_error)
    __pyx_t_16 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 18.0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_19, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_16, __pyx_int_6, __pyx_int_3};
      __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, __pyx_t_16);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_16 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_15, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 207, __pyx_L1_error)
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
        __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_point_b.diminfo[0].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_b.diminfo[0].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_b.diminfo[1].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_b.diminfo[1].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_b.diminfo[2].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_b.diminfo[2].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
    }
    __pyx_t_24 = 0;
    __pyx_v_point_b = ((PyArrayObject *)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":208
 *         tmp=np.append(tmp,point_b2)
 *         point_b=tmp.reshape(int(len(tmp)/18),6,3)
 *         point_b=remove_doubling_dim3_in_perp_space(point_b)             # <<<<<<<<<<<<<<
 *         #
 *         return [point_common,point_a,point_b]
 */
    __pyx_t_17 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_point_b), 0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        }
        __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0;
      }
      __pyx_pybuffernd_point_b.diminfo[0].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point_b.diminfo[0].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point_b.diminfo[1].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point_b.diminfo[1].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_point_b.diminfo[2].strides = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_point_b.diminfo[2].shape = __pyx_pybuffernd_point_b.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_point_b, ((PyArrayObject *)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":210
 *         point_b=remove_doubling_dim3_in_perp_space(point_b)
 *         #
 *         return [point_common,point_a,point_b]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_17 = PyList_New(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(((PyObject *)__pyx_v_point_common));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_point_common));
    PyList_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_v_point_common));
    __Pyx_INCREF(((PyObject *)__pyx_v_point_a));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_point_a));
    PyList_SET_ITEM(__pyx_t_17, 1, ((PyObject *)__pyx_v_point_a));
    __Pyx_INCREF(((PyObject *)__pyx_v_point_b));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b));
    PyList_SET_ITEM(__pyx_t_17, 2, ((PyObject *)__pyx_v_point_b));
    __pyx_r = ((PyObject*)__pyx_t_17);
    __pyx_t_17 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":58
 *     return p
 * 
 * cpdef list intersection_two_obj_convex(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                         int verbose):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_19);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tet.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj_convex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ed2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1_surf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_a2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_common.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_tmp.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tet.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj1_surf);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2_surf);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj1_edge);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2_edge);
  __Pyx_XDECREF((PyObject *)__pyx_v_p);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_tmp);
  __Pyx_XDECREF((PyObject *)__pyx_v_tet);
  __Pyx_XDECREF((PyObject *)__pyx_v_tr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tr2);
  __Pyx_XDECREF((PyObject *)__pyx_v_ed1);
  __Pyx_XDECREF((PyObject *)__pyx_v_ed2);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_a2);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_b1);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_b2);
  __Pyx_XDECREF((PyObject *)__pyx_v_point);
  __Pyx_XDECREF((PyObject *)__pyx_v_point1);
  __Pyx_XDECREF((PyObject *)__pyx_v_point_common);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_1intersection_two_obj_convex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_1intersection_two_obj_convex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection_two_obj_convex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_verbose,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj_convex", 1, 3, 3, 1); __PYX_ERR(0, 58, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj_convex", 1, 3, 3, 2); __PYX_ERR(0, 58, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection_two_obj_convex") < 0)) __PYX_ERR(0, 58, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_obj1 = ((PyArrayObject *)values[0]);
    __pyx_v_obj2 = ((PyArrayObject *)values[1]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection_two_obj_convex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 58, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj_convex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj1), __pyx_ptype_5numpy_ndarray, 1, "obj1", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 59, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  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("intersection_two_obj_convex", 0);
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 58, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 58, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_verbose, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj_convex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":214
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_two_obj(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                     int flag1,
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_3intersection_two_obj(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_flag1, int __pyx_v_flag2, int __pyx_v_flag3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_counter;
  double __pyx_v_dd2;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_cent2 = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4_common = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent2;
  __Pyx_Buffer __pyx_pybuffer_cent2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4_common;
  __Pyx_Buffer __pyx_pybuffer_tmp4_common;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyArrayObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_two_obj", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_cent2.pybuffer.buf = NULL;
  __pyx_pybuffer_cent2.refcount = 0;
  __pyx_pybuffernd_cent2.data = NULL;
  __pyx_pybuffernd_cent2.rcbuffer = &__pyx_pybuffer_cent2;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tmp4_common.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4_common.refcount = 0;
  __pyx_pybuffernd_tmp4_common.data = NULL;
  __pyx_pybuffernd_tmp4_common.rcbuffer = &__pyx_pybuffer_tmp4_common;
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":230
 *     flag3 = 0, rough check intersection of tetrahedron in obj1 and tetrahedron in obj2; flag3 = 1, no
 *     """
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('     intersection_two_obj()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":231
 *     """
 *     if verbose>0:
 *         print('     intersection_two_obj()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":230
 *     flag3 = 0, rough check intersection of tetrahedron in obj1 and tetrahedron in obj2; flag3 = 1, no
 *     """
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('     intersection_two_obj()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":233
 *         print('     intersection_two_obj()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp4_common=np.array([[[[0]]]])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":235
 *         pass
 * 
 *     tmp4_common=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 235, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
      __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 235, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp4_common = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":236
 * 
 *     tmp4_common=np.array([[[[0]]]])
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2             # <<<<<<<<<<<<<<
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:
 */
  __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":237
 *     tmp4_common=np.array([[[[0]]]])
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('      rough intersection check, no intersection, skip')
 */
    __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_obj(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2)) == 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":238
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('      rough intersection check, no intersection, skip')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":239
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:
 *                 print('      rough intersection check, no intersection, skip')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":238
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('      rough intersection check, no intersection, skip')
 *             else:
 */
        goto __pyx_L6;
      }

      /* "pyqcstrc/icosah/intsct.pyx":241
 *                 print('      rough intersection check, no intersection, skip')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp4_common
 *         else:
 */
      /*else*/ {
      }
      __pyx_L6:;

      /* "pyqcstrc/icosah/intsct.pyx":242
 *             else:
 *                 pass
 *             return tmp4_common             # <<<<<<<<<<<<<<
 *         else:
 *             if flag2==0: # filtering ON, rough check intersection of tetrahedron in obj1 and obj2
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/intsct.pyx":237
 *     tmp4_common=np.array([[[[0]]]])
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('      rough intersection check, no intersection, skip')
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":244
 *             return tmp4_common
 *         else:
 *             if flag2==0: # filtering ON, rough check intersection of tetrahedron in obj1 and obj2             # <<<<<<<<<<<<<<
 *                 cent2=centroid_obj(obj2)
 *                 dd2=ball_radius_obj(obj2,cent2)
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_flag2 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":245
 *         else:
 *             if flag2==0: # filtering ON, rough check intersection of tetrahedron in obj1 and obj2
 *                 cent2=centroid_obj(obj2)             # <<<<<<<<<<<<<<
 *                 dd2=ball_radius_obj(obj2,cent2)
 *                 counter=0
 */
        __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_centroid_obj(((PyArrayObject *)__pyx_v_obj2))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_7 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
            }
            __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
          }
          __pyx_pybuffernd_cent2.diminfo[0].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent2.diminfo[0].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent2.diminfo[1].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent2.diminfo[1].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[1];
          if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
        }
        __pyx_v_cent2 = ((PyArrayObject *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":246
 *             if flag2==0: # filtering ON, rough check intersection of tetrahedron in obj1 and obj2
 *                 cent2=centroid_obj(obj2)
 *                 dd2=ball_radius_obj(obj2,cent2)             # <<<<<<<<<<<<<<
 *                 counter=0
 *                 for i1 in range(len(obj1)):
 */
        __pyx_v_dd2 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius_obj(((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_cent2));

        /* "pyqcstrc/icosah/intsct.pyx":247
 *                 cent2=centroid_obj(obj2)
 *                 dd2=ball_radius_obj(obj2,cent2)
 *                 counter=0             # <<<<<<<<<<<<<<
 *                 for i1 in range(len(obj1)):
 *                     if verbose>0:
 */
        __pyx_v_counter = 0;

        /* "pyqcstrc/icosah/intsct.pyx":248
 *                 dd2=ball_radius_obj(obj2,cent2)
 *                 counter=0
 *                 for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *                     if verbose>0:
 *                         print('      %d-th tetrahedron in obj1'%(i1))
 */
        __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 248, __pyx_L1_error)
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
          __pyx_v_i1 = __pyx_t_7;

          /* "pyqcstrc/icosah/intsct.pyx":249
 *                 counter=0
 *                 for i1 in range(len(obj1)):
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('      %d-th tetrahedron in obj1'%(i1))
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":250
 *                 for i1 in range(len(obj1)):
 *                     if verbose>0:
 *                         print('      %d-th tetrahedron in obj1'%(i1))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d_th_tetrahedron_in_obj1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __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;

            /* "pyqcstrc/icosah/intsct.pyx":249
 *                 counter=0
 *                 for i1 in range(len(obj1)):
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('      %d-th tetrahedron in obj1'%(i1))
 *                     else:
 */
            goto __pyx_L10;
          }

          /* "pyqcstrc/icosah/intsct.pyx":252
 *                         print('      %d-th tetrahedron in obj1'%(i1))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     if rough_check_intersection_tetrahedron_obj(obj1[i1],cent2,dd2)==0:
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 */
          /*else*/ {
          }
          __pyx_L10:;

          /* "pyqcstrc/icosah/intsct.pyx":253
 *                     else:
 *                         pass
 *                     if rough_check_intersection_tetrahedron_obj(obj1[i1],cent2,dd2)==0:             # <<<<<<<<<<<<<<
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                         #if len(tmp4a)!=1:
 */
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 253, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_tetrahedron_obj(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_v_cent2), __pyx_v_dd2) == 0) != 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":254
 *                         pass
 *                     if rough_check_intersection_tetrahedron_obj(obj1[i1],cent2,dd2)==0:
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)             # <<<<<<<<<<<<<<
 *                         #if len(tmp4a)!=1:
 *                         if tmp4a.tolist()!=[[[[0]]]]:
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 254, __pyx_L1_error)
            __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_flag3, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
              __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_13 < 0)) {
                PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                  Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
                  __Pyx_RaiseBufferFallbackError();
                } else {
                  PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
                }
                __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
              }
              __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":256
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                         #if len(tmp4a)!=1:
 *                         if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                             if counter==0:
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = NULL;
            if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_int_0);
            __Pyx_GIVEREF(__pyx_int_0);
            PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
            __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_2);
            PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_5);
            PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_2);
            PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __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(0, 256, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":257
 *                         #if len(tmp4a)!=1:
 *                         if tmp4a.tolist()!=[[[[0]]]]:
 *                             if counter==0:             # <<<<<<<<<<<<<<
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 */
              __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/intsct.pyx":258
 *                         if tmp4a.tolist()!=[[[[0]]]]:
 *                             if counter==0:
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a)
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 258, __pyx_L1_error)
                __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_14 * 72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_3 = NULL;
                if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 258, __pyx_L1_error)
                __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_13 < 0)) {
                    PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
                    }
                    __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
                  }
                  __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 258, __pyx_L1_error)
                }
                __pyx_t_15 = 0;
                __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
                __pyx_t_2 = 0;

                /* "pyqcstrc/icosah/intsct.pyx":257
 *                         #if len(tmp4a)!=1:
 *                         if tmp4a.tolist()!=[[[[0]]]]:
 *                             if counter==0:             # <<<<<<<<<<<<<<
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 */
                goto __pyx_L13;
              }

              /* "pyqcstrc/icosah/intsct.pyx":260
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a)             # <<<<<<<<<<<<<<
 *                             counter+=1
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && 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_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
                  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
                  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_5) {
                    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1a));
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp4a));
                  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 260, __pyx_L1_error)
                __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_13 < 0)) {
                    PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
                    }
                    __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
                  }
                  __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
                }
                __pyx_t_15 = 0;
                __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
                __pyx_t_2 = 0;
              }
              __pyx_L13:;

              /* "pyqcstrc/icosah/intsct.pyx":261
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a)
 *                             counter+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_v_counter = (__pyx_v_counter + 1);

              /* "pyqcstrc/icosah/intsct.pyx":256
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                         #if len(tmp4a)!=1:
 *                         if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                             if counter==0:
 *                                  tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
              goto __pyx_L12;
            }

            /* "pyqcstrc/icosah/intsct.pyx":263
 *                             counter+=1
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     else:
 *                         if verbose>0:
 */
            /*else*/ {
            }
            __pyx_L12:;

            /* "pyqcstrc/icosah/intsct.pyx":253
 *                     else:
 *                         pass
 *                     if rough_check_intersection_tetrahedron_obj(obj1[i1],cent2,dd2)==0:             # <<<<<<<<<<<<<<
 *                         tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                         #if len(tmp4a)!=1:
 */
            goto __pyx_L11;
          }

          /* "pyqcstrc/icosah/intsct.pyx":265
 *                             pass
 *                     else:
 *                         if verbose>0:             # <<<<<<<<<<<<<<
 *                             print('      rough intersection check, no intersection, skip')
 *                         else:
 */
          /*else*/ {
            __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":266
 *                     else:
 *                         if verbose>0:
 *                             print('      rough intersection check, no intersection, skip')             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/intsct.pyx":265
 *                             pass
 *                     else:
 *                         if verbose>0:             # <<<<<<<<<<<<<<
 *                             print('      rough intersection check, no intersection, skip')
 *                         else:
 */
              goto __pyx_L14;
            }

            /* "pyqcstrc/icosah/intsct.pyx":268
 *                             print('      rough intersection check, no intersection, skip')
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                 if counter>0:
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
            /*else*/ {
            }
            __pyx_L14:;
          }
          __pyx_L11:;
        }

        /* "pyqcstrc/icosah/intsct.pyx":269
 *                         else:
 *                             pass
 *                 if counter>0:             # <<<<<<<<<<<<<<
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":270
 *                             pass
 *                 if counter>0:
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 270, __pyx_L1_error)
          __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && 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;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 270, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_t_3);
            __Pyx_INCREF(__pyx_int_4);
            __Pyx_GIVEREF(__pyx_int_4);
            PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_int_4);
            __Pyx_INCREF(__pyx_int_6);
            __Pyx_GIVEREF(__pyx_int_6);
            PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_7, __pyx_int_6);
            __Pyx_INCREF(__pyx_int_3);
            __Pyx_GIVEREF(__pyx_int_3);
            PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_7, __pyx_int_3);
            __pyx_t_3 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 270, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
            __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_7 < 0)) {
              PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
              }
              __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
            }
            __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 270, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":269
 *                         else:
 *                             pass
 *                 if counter>0:             # <<<<<<<<<<<<<<
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/intsct.pyx":272
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return tmp4_common
 *             else:
 */
        /*else*/ {
        }
        __pyx_L15:;

        /* "pyqcstrc/icosah/intsct.pyx":273
 *                 else:
 *                     pass
 *                 return tmp4_common             # <<<<<<<<<<<<<<
 *             else:
 *                 counter=0
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
        goto __pyx_L0;

        /* "pyqcstrc/icosah/intsct.pyx":244
 *             return tmp4_common
 *         else:
 *             if flag2==0: # filtering ON, rough check intersection of tetrahedron in obj1 and obj2             # <<<<<<<<<<<<<<
 *                 cent2=centroid_obj(obj2)
 *                 dd2=ball_radius_obj(obj2,cent2)
 */
      }

      /* "pyqcstrc/icosah/intsct.pyx":275
 *                 return tmp4_common
 *             else:
 *                 counter=0             # <<<<<<<<<<<<<<
 *                 for i1 in range(len(obj1)):
 *                     tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 */
      /*else*/ {
        __pyx_v_counter = 0;

        /* "pyqcstrc/icosah/intsct.pyx":276
 *             else:
 *                 counter=0
 *                 for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *                     tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                     #if len(tmp4a)!=1:
 */
        __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 276, __pyx_L1_error)
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
          __pyx_v_i1 = __pyx_t_7;

          /* "pyqcstrc/icosah/intsct.pyx":277
 *                 counter=0
 *                 for i1 in range(len(obj1)):
 *                     tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)             # <<<<<<<<<<<<<<
 *                     #if len(tmp4a)!=1:
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 */
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 277, __pyx_L1_error)
          __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_flag3, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
              }
              __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
            }
            __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 277, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":279
 *                     tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                     #if len(tmp4a)!=1:
 *                     if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         if counter==0:
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_4 = (__pyx_t_16) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_16) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_GIVEREF(__pyx_int_0);
          PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
          __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_16);
          PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_16);
          __pyx_t_16 = 0;
          __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_16, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 279, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":280
 *                     #if len(tmp4a)!=1:
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 *                         if counter==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":281
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 *                         if counter==0:
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a)
 */
              __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 281, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 281, __pyx_L1_error)
              __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_14 * 72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_16, function);
                }
              }
              __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 281, __pyx_L1_error)
              __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_13 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
                  }
                  __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
                }
                __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 281, __pyx_L1_error)
              }
              __pyx_t_15 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/intsct.pyx":280
 *                     #if len(tmp4a)!=1:
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 *                         if counter==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 */
              goto __pyx_L19;
            }

            /* "pyqcstrc/icosah/intsct.pyx":283
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a)             # <<<<<<<<<<<<<<
 *                         counter+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 283, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __pyx_t_16 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
                if (likely(__pyx_t_16)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_16);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_4, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_16) {
                  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_16); __pyx_t_16 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp4a));
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 283, __pyx_L1_error)
              __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_13 < 0)) {
                  PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
                  }
                  __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
                }
                __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 283, __pyx_L1_error)
              }
              __pyx_t_15 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L19:;

            /* "pyqcstrc/icosah/intsct.pyx":284
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a)
 *                         counter+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_v_counter = (__pyx_v_counter + 1);

            /* "pyqcstrc/icosah/intsct.pyx":279
 *                     tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *                     #if len(tmp4a)!=1:
 *                     if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         if counter==0:
 *                             tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
            goto __pyx_L18;
          }

          /* "pyqcstrc/icosah/intsct.pyx":286
 *                         counter+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter>0:
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
          /*else*/ {
          }
          __pyx_L18:;
        }

        /* "pyqcstrc/icosah/intsct.pyx":287
 *                     else:
 *                         pass
 *                 if counter>0:             # <<<<<<<<<<<<<<
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":288
 *                         pass
 *                 if counter>0:
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
          __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_7 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_5 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            if (__pyx_t_16) {
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); __pyx_t_16 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_3);
            __Pyx_INCREF(__pyx_int_4);
            __Pyx_GIVEREF(__pyx_int_4);
            PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_4);
            __Pyx_INCREF(__pyx_int_6);
            __Pyx_GIVEREF(__pyx_int_6);
            PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_int_6);
            __Pyx_INCREF(__pyx_int_3);
            __Pyx_GIVEREF(__pyx_int_3);
            PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_7, __pyx_int_3);
            __pyx_t_3 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 288, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
            __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_7 < 0)) {
              PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
              }
              __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
            }
            __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 288, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":287
 *                     else:
 *                         pass
 *                 if counter>0:             # <<<<<<<<<<<<<<
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 */
          goto __pyx_L20;
        }

        /* "pyqcstrc/icosah/intsct.pyx":290
 *                     tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return tmp4_common
 *     else:
 */
        /*else*/ {
        }
        __pyx_L20:;

        /* "pyqcstrc/icosah/intsct.pyx":291
 *                 else:
 *                     pass
 *                 return tmp4_common             # <<<<<<<<<<<<<<
 *     else:
 *         counter=0
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
        goto __pyx_L0;
      }
    }

    /* "pyqcstrc/icosah/intsct.pyx":236
 * 
 *     tmp4_common=np.array([[[[0]]]])
 *     if flag1==0: # filtering ON, rough check intersection of obj1 and obj2             # <<<<<<<<<<<<<<
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":293
 *                 return tmp4_common
 *     else:
 *         counter=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj1)):
 *             tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 */
  /*else*/ {
    __pyx_v_counter = 0;

    /* "pyqcstrc/icosah/intsct.pyx":294
 *     else:
 *         counter=0
 *         for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *             tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *             #if len(tmp4a)!=1:
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 294, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i1 = __pyx_t_7;

      /* "pyqcstrc/icosah/intsct.pyx":295
 *         counter=0
 *         for i1 in range(len(obj1)):
 *             tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)             # <<<<<<<<<<<<<<
 *             #if len(tmp4a)!=1:
 *             if tmp4a.tolist()!=[[[[0]]]]:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 295, __pyx_L1_error)
      __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_flag3, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          }
          __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
        }
        __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 295, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":297
 *             tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *             #if len(tmp4a)!=1:
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __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(0, 297, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":298
 *             #if len(tmp4a)!=1:
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":299
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter==0:
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a)
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 299, __pyx_L1_error)
          __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_14 * 72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 299, __pyx_L1_error)
          __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
              }
              __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 299, __pyx_L1_error)
          }
          __pyx_t_15 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":298
 *             #if len(tmp4a)!=1:
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                 else:
 */
          goto __pyx_L24;
        }

        /* "pyqcstrc/icosah/intsct.pyx":301
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a)             # <<<<<<<<<<<<<<
 *                 counter+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && 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_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp4a));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 301, __pyx_L1_error)
          __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 0)) {
              PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
              }
              __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 301, __pyx_L1_error)
          }
          __pyx_t_15 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L24:;

        /* "pyqcstrc/icosah/intsct.pyx":302
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a)
 *                 counter+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter = (__pyx_v_counter + 1);

        /* "pyqcstrc/icosah/intsct.pyx":297
 *             tmp4a=intersection_tetrahedron_obj_4(obj1[i1],obj2,flag3,verbose)
 *             #if len(tmp4a)!=1:
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if counter==0:
 *                     tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
        goto __pyx_L23;
      }

      /* "pyqcstrc/icosah/intsct.pyx":304
 *                 counter+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter>0:
 *             tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
      /*else*/ {
      }
      __pyx_L23:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":305
 *             else:
 *                 pass
 *         if counter>0:             # <<<<<<<<<<<<<<
 *             tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_counter > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":306
 *                 pass
 *         if counter>0:
 *             tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 306, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && 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;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 306, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_t_3);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_7, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_7, __pyx_int_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 306, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_7 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
          }
          __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
        }
        __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":305
 *             else:
 *                 pass
 *         if counter>0:             # <<<<<<<<<<<<<<
 *             tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 */
      goto __pyx_L25;
    }

    /* "pyqcstrc/icosah/intsct.pyx":308
 *             tmp4_common=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4_common
 * 
 */
    /*else*/ {
    }
    __pyx_L25:;

    /* "pyqcstrc/icosah/intsct.pyx":309
 *         else:
 *             pass
 *         return tmp4_common             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":214
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_two_obj(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                     int flag1,
 */

  /* 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_16);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_cent2);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4_common);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_3intersection_two_obj(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_3intersection_two_obj(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  int __pyx_v_flag1;
  int __pyx_v_flag2;
  int __pyx_v_flag3;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection_two_obj (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_flag1,&__pyx_n_s_flag2,&__pyx_n_s_flag3,&__pyx_n_s_verbose,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, 1); __PYX_ERR(0, 214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, 2); __PYX_ERR(0, 214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, 3); __PYX_ERR(0, 214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, 4); __PYX_ERR(0, 214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, 5); __PYX_ERR(0, 214, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection_two_obj") < 0)) __PYX_ERR(0, 214, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_obj1 = ((PyArrayObject *)values[0]);
    __pyx_v_obj2 = ((PyArrayObject *)values[1]);
    __pyx_v_flag1 = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_flag1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error)
    __pyx_v_flag2 = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_flag2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L3_error)
    __pyx_v_flag3 = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_flag3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L3_error)
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection_two_obj", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 214, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj1), __pyx_ptype_5numpy_ndarray, 1, "obj1", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 215, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_2intersection_two_obj(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_flag1, __pyx_v_flag2, __pyx_v_flag3, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_2intersection_two_obj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_flag1, int __pyx_v_flag2, int __pyx_v_flag3, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  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("intersection_two_obj", 0);
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_flag1, __pyx_v_flag2, __pyx_v_flag3, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":313
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_two_tetrahedron(np.ndarray[DTYPE_int_t, ndim=2] centroid1,             # <<<<<<<<<<<<<<
 *                                                     double dd1,
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] tetrahedron2):
 */

static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_tetrahedron(PyArrayObject *__pyx_v_centroid1, double __pyx_v_dd1, PyArrayObject *__pyx_v_tetrahedron2) {
  double __pyx_v_dd2;
  PyArrayObject *__pyx_v_cent2 = 0;
  double __pyx_v_dd0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent2;
  __Pyx_Buffer __pyx_pybuffer_cent2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_centroid1;
  __Pyx_Buffer __pyx_pybuffer_centroid1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron2;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron2;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rough_check_intersection_two_tetrahedron", 0);
  __pyx_pybuffer_cent2.pybuffer.buf = NULL;
  __pyx_pybuffer_cent2.refcount = 0;
  __pyx_pybuffernd_cent2.data = NULL;
  __pyx_pybuffernd_cent2.rcbuffer = &__pyx_pybuffer_cent2;
  __pyx_pybuffer_centroid1.pybuffer.buf = NULL;
  __pyx_pybuffer_centroid1.refcount = 0;
  __pyx_pybuffernd_centroid1.data = NULL;
  __pyx_pybuffernd_centroid1.rcbuffer = &__pyx_pybuffer_centroid1;
  __pyx_pybuffer_tetrahedron2.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron2.refcount = 0;
  __pyx_pybuffernd_tetrahedron2.data = NULL;
  __pyx_pybuffernd_tetrahedron2.rcbuffer = &__pyx_pybuffer_tetrahedron2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_centroid1.rcbuffer->pybuffer, (PyObject*)__pyx_v_centroid1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 313, __pyx_L1_error)
  }
  __pyx_pybuffernd_centroid1.diminfo[0].strides = __pyx_pybuffernd_centroid1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_centroid1.diminfo[0].shape = __pyx_pybuffernd_centroid1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_centroid1.diminfo[1].strides = __pyx_pybuffernd_centroid1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_centroid1.diminfo[1].shape = __pyx_pybuffernd_centroid1.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 313, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron2.diminfo[0].strides = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron2.diminfo[0].shape = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron2.diminfo[1].strides = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron2.diminfo[1].shape = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron2.diminfo[2].strides = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron2.diminfo[2].shape = __pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/intsct.pyx":319
 *     cdef np.ndarray[DTYPE_int_t,ndim=2] cent2
 * 
 *     cent2=centroid(tetrahedron2)             # <<<<<<<<<<<<<<
 *     dd2=ball_radius(tetrahedron2,cent2)
 *     dd0=distance_in_perp_space(centroid1,cent2)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_v_tetrahedron2), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
      __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0;
    }
    __pyx_pybuffernd_cent2.diminfo[0].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent2.diminfo[0].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent2.diminfo[1].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent2.diminfo[1].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
  }
  __pyx_v_cent2 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":320
 * 
 *     cent2=centroid(tetrahedron2)
 *     dd2=ball_radius(tetrahedron2,cent2)             # <<<<<<<<<<<<<<
 *     dd0=distance_in_perp_space(centroid1,cent2)
 *     if dd0<=dd1+dd2: # two balls are intersecting.
 */
  __pyx_v_dd2 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius(((PyArrayObject *)__pyx_v_tetrahedron2), ((PyArrayObject *)__pyx_v_cent2));

  /* "pyqcstrc/icosah/intsct.pyx":321
 *     cent2=centroid(tetrahedron2)
 *     dd2=ball_radius(tetrahedron2,cent2)
 *     dd0=distance_in_perp_space(centroid1,cent2)             # <<<<<<<<<<<<<<
 *     if dd0<=dd1+dd2: # two balls are intersecting.
 *         return 0
 */
  __pyx_v_dd0 = __pyx_f_8pyqcstrc_6icosah_6intsct_distance_in_perp_space(((PyArrayObject *)__pyx_v_centroid1), ((PyArrayObject *)__pyx_v_cent2));

  /* "pyqcstrc/icosah/intsct.pyx":322
 *     dd2=ball_radius(tetrahedron2,cent2)
 *     dd0=distance_in_perp_space(centroid1,cent2)
 *     if dd0<=dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  __pyx_t_6 = ((__pyx_v_dd0 <= (__pyx_v_dd1 + __pyx_v_dd2)) != 0);
  if (__pyx_t_6) {

    /* "pyqcstrc/icosah/intsct.pyx":323
 *     dd0=distance_in_perp_space(centroid1,cent2)
 *     if dd0<=dd1+dd2: # two balls are intersecting.
 *         return 0             # <<<<<<<<<<<<<<
 *     else: #
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":322
 *     dd2=ball_radius(tetrahedron2,cent2)
 *     dd0=distance_in_perp_space(centroid1,cent2)
 *     if dd0<=dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":325
 *         return 0
 *     else: #
 *         return 1             # <<<<<<<<<<<<<<
 * """
 * cdef np.ndarray intersection_two_tetrahedron(np.ndarray[DTYPE_int_t, ndim=2] centroid1,\
 */
  /*else*/ {
    __pyx_r = 1;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":313
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_two_tetrahedron(np.ndarray[DTYPE_int_t, ndim=2] centroid1,             # <<<<<<<<<<<<<<
 *                                                     double dd1,
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] tetrahedron2):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.rough_check_intersection_two_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cent2);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":374
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_tetrahedron_obj(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                      np.ndarray[DTYPE_int_t,ndim=2] cent2,
 *                                                      double dd2):
 */

static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_tetrahedron_obj(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_cent2, double __pyx_v_dd2) {
  double __pyx_v_dd1;
  PyArrayObject *__pyx_v_cent1 = 0;
  double __pyx_v_dd0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent1;
  __Pyx_Buffer __pyx_pybuffer_cent1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent2;
  __Pyx_Buffer __pyx_pybuffer_cent2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rough_check_intersection_tetrahedron_obj", 0);
  __pyx_pybuffer_cent1.pybuffer.buf = NULL;
  __pyx_pybuffer_cent1.refcount = 0;
  __pyx_pybuffernd_cent1.data = NULL;
  __pyx_pybuffernd_cent1.rcbuffer = &__pyx_pybuffer_cent1;
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_cent2.pybuffer.buf = NULL;
  __pyx_pybuffer_cent2.refcount = 0;
  __pyx_pybuffernd_cent2.data = NULL;
  __pyx_pybuffernd_cent2.rcbuffer = &__pyx_pybuffer_cent2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 374, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 374, __pyx_L1_error)
  }
  __pyx_pybuffernd_cent2.diminfo[0].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent2.diminfo[0].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent2.diminfo[1].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent2.diminfo[1].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":380
 *     cdef np.ndarray[DTYPE_int_t,ndim=2] cent1
 * 
 *     cent1=centroid(tetrahedron)             # <<<<<<<<<<<<<<
 *     dd1=ball_radius(tetrahedron,cent1)
 *     dd0=distance_in_perp_space(cent1,cent2)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_v_tetrahedron), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
      __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0;
    }
    __pyx_pybuffernd_cent1.diminfo[0].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent1.diminfo[0].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent1.diminfo[1].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent1.diminfo[1].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 380, __pyx_L1_error)
  }
  __pyx_v_cent1 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":381
 * 
 *     cent1=centroid(tetrahedron)
 *     dd1=ball_radius(tetrahedron,cent1)             # <<<<<<<<<<<<<<
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 */
  __pyx_v_dd1 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_cent1));

  /* "pyqcstrc/icosah/intsct.pyx":382
 *     cent1=centroid(tetrahedron)
 *     dd1=ball_radius(tetrahedron,cent1)
 *     dd0=distance_in_perp_space(cent1,cent2)             # <<<<<<<<<<<<<<
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 *         return 0
 */
  __pyx_v_dd0 = __pyx_f_8pyqcstrc_6icosah_6intsct_distance_in_perp_space(((PyArrayObject *)__pyx_v_cent1), ((PyArrayObject *)__pyx_v_cent2));

  /* "pyqcstrc/icosah/intsct.pyx":383
 *     dd1=ball_radius(tetrahedron,cent1)
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  __pyx_t_6 = ((__pyx_v_dd0 <= (__pyx_v_dd1 + __pyx_v_dd2)) != 0);
  if (__pyx_t_6) {

    /* "pyqcstrc/icosah/intsct.pyx":384
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 *         return 0             # <<<<<<<<<<<<<<
 *     else: #
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":383
 *     dd1=ball_radius(tetrahedron,cent1)
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":386
 *         return 0
 *     else: #
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  /*else*/ {
    __pyx_r = 1;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":374
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_tetrahedron_obj(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                      np.ndarray[DTYPE_int_t,ndim=2] cent2,
 *                                                      double dd2):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.rough_check_intersection_tetrahedron_obj", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cent1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":390
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_two_obj(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                              np.ndarray[DTYPE_int_t, ndim=4] obj2):
 *     cdef double dd1,dd2
 */

static int __pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_obj(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2) {
  double __pyx_v_dd1;
  double __pyx_v_dd2;
  PyArrayObject *__pyx_v_cent1 = 0;
  PyArrayObject *__pyx_v_cent2 = 0;
  double __pyx_v_dd0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent1;
  __Pyx_Buffer __pyx_pybuffer_cent1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent2;
  __Pyx_Buffer __pyx_pybuffer_cent2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rough_check_intersection_two_obj", 0);
  __pyx_pybuffer_cent1.pybuffer.buf = NULL;
  __pyx_pybuffer_cent1.refcount = 0;
  __pyx_pybuffernd_cent1.data = NULL;
  __pyx_pybuffernd_cent1.rcbuffer = &__pyx_pybuffer_cent1;
  __pyx_pybuffer_cent2.pybuffer.buf = NULL;
  __pyx_pybuffer_cent2.refcount = 0;
  __pyx_pybuffernd_cent2.data = NULL;
  __pyx_pybuffernd_cent2.rcbuffer = &__pyx_pybuffer_cent2;
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 390, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 390, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":395
 *     cdef np.ndarray[DTYPE_int_t,ndim=2] cent1,cent2
 * 
 *     cent1=centroid_obj(obj1)             # <<<<<<<<<<<<<<
 *     cent2=centroid_obj(obj2)
 *     dd1=ball_radius_obj(obj1,cent1)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_centroid_obj(((PyArrayObject *)__pyx_v_obj1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
      __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0;
    }
    __pyx_pybuffernd_cent1.diminfo[0].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent1.diminfo[0].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent1.diminfo[1].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent1.diminfo[1].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 395, __pyx_L1_error)
  }
  __pyx_v_cent1 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":396
 * 
 *     cent1=centroid_obj(obj1)
 *     cent2=centroid_obj(obj2)             # <<<<<<<<<<<<<<
 *     dd1=ball_radius_obj(obj1,cent1)
 *     dd2=ball_radius_obj(obj2,cent2)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_centroid_obj(((PyArrayObject *)__pyx_v_obj2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      }
      __pyx_t_5 = __pyx_t_4 = __pyx_t_3 = 0;
    }
    __pyx_pybuffernd_cent2.diminfo[0].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent2.diminfo[0].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent2.diminfo[1].strides = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent2.diminfo[1].shape = __pyx_pybuffernd_cent2.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 396, __pyx_L1_error)
  }
  __pyx_v_cent2 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":397
 *     cent1=centroid_obj(obj1)
 *     cent2=centroid_obj(obj2)
 *     dd1=ball_radius_obj(obj1,cent1)             # <<<<<<<<<<<<<<
 *     dd2=ball_radius_obj(obj2,cent2)
 *     dd0=distance_in_perp_space(cent1,cent2)
 */
  __pyx_v_dd1 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius_obj(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_cent1));

  /* "pyqcstrc/icosah/intsct.pyx":398
 *     cent2=centroid_obj(obj2)
 *     dd1=ball_radius_obj(obj1,cent1)
 *     dd2=ball_radius_obj(obj2,cent2)             # <<<<<<<<<<<<<<
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 */
  __pyx_v_dd2 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius_obj(((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_cent2));

  /* "pyqcstrc/icosah/intsct.pyx":399
 *     dd1=ball_radius_obj(obj1,cent1)
 *     dd2=ball_radius_obj(obj2,cent2)
 *     dd0=distance_in_perp_space(cent1,cent2)             # <<<<<<<<<<<<<<
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 *         return 0
 */
  __pyx_v_dd0 = __pyx_f_8pyqcstrc_6icosah_6intsct_distance_in_perp_space(((PyArrayObject *)__pyx_v_cent1), ((PyArrayObject *)__pyx_v_cent2));

  /* "pyqcstrc/icosah/intsct.pyx":400
 *     dd2=ball_radius_obj(obj2,cent2)
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  __pyx_t_6 = ((__pyx_v_dd0 <= (__pyx_v_dd1 + __pyx_v_dd2)) != 0);
  if (__pyx_t_6) {

    /* "pyqcstrc/icosah/intsct.pyx":401
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.
 *         return 0             # <<<<<<<<<<<<<<
 *     else: #
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":400
 *     dd2=ball_radius_obj(obj2,cent2)
 *     dd0=distance_in_perp_space(cent1,cent2)
 *     if dd0 <= dd1+dd2: # two balls are intersecting.             # <<<<<<<<<<<<<<
 *         return 0
 *     else: #
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":403
 *         return 0
 *     else: #
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  /*else*/ {
    __pyx_r = 1;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":390
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef int rough_check_intersection_two_obj(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                              np.ndarray[DTYPE_int_t, ndim=4] obj2):
 *     cdef double dd1,dd2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.rough_check_intersection_two_obj", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cent1);
  __Pyx_XDECREF((PyObject *)__pyx_v_cent2);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":407
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_using_tetrahedron_4(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     int verbose,
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_5intersection_using_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_v_dummy, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter1;
  int __pyx_v_counter3;
  long __pyx_v_v1a;
  long __pyx_v_v1b;
  long __pyx_v_v1c;
  long __pyx_v_v2a;
  long __pyx_v_v2b;
  long __pyx_v_v2c;
  long __pyx_v_v3a;
  long __pyx_v_v3b;
  long __pyx_v_v3c;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  double __pyx_v_vol3;
  double __pyx_v_vol4;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_tmp4_common = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1c;
  __Pyx_Buffer __pyx_pybuffer_tmp1c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4_common;
  __Pyx_Buffer __pyx_pybuffer_tmp4_common;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  long __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_24;
  int __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_using_tetrahedron_4", 0);
  __pyx_pybuffer_tmp1b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1b.refcount = 0;
  __pyx_pybuffernd_tmp1b.data = NULL;
  __pyx_pybuffernd_tmp1b.rcbuffer = &__pyx_pybuffer_tmp1b;
  __pyx_pybuffer_tmp1c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1c.refcount = 0;
  __pyx_pybuffernd_tmp1c.data = NULL;
  __pyx_pybuffernd_tmp1c.rcbuffer = &__pyx_pybuffer_tmp1c;
  __pyx_pybuffer_tmp4_common.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4_common.refcount = 0;
  __pyx_pybuffernd_tmp4_common.data = NULL;
  __pyx_pybuffernd_tmp4_common.rcbuffer = &__pyx_pybuffer_tmp4_common;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tmp4b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4b.refcount = 0;
  __pyx_pybuffernd_tmp4b.data = NULL;
  __pyx_pybuffernd_tmp4b.rcbuffer = &__pyx_pybuffer_tmp4b;
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 407, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 407, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":420
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4_common,tmp4a,tmp4b
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      intersection_using_tetrahedron_4()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":421
 * 
 *     if verbose>0:
 *         print('      intersection_using_tetrahedron_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":420
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4_common,tmp4a,tmp4b
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      intersection_using_tetrahedron_4()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":423
 *         print('      intersection_using_tetrahedron_4()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v1a,v1b,v1c=obj_volume_6d(obj1)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":425
 *         pass
 * 
 *     v1a,v1b,v1c=obj_volume_6d(obj1)             # <<<<<<<<<<<<<<
 *     vol2=obj_volume_6d_numerical(obj1)
 *     if verbose>1:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    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(0, 425, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 425, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v1a = __pyx_t_6;
  __pyx_v_v1b = __pyx_t_7;
  __pyx_v_v1c = __pyx_t_8;

  /* "pyqcstrc/icosah/intsct.pyx":426
 * 
 *     v1a,v1b,v1c=obj_volume_6d(obj1)
 *     vol2=obj_volume_6d_numerical(obj1)             # <<<<<<<<<<<<<<
 *     if verbose>1:
 *         print('      obj1, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 */
  __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj1), 0);

  /* "pyqcstrc/icosah/intsct.pyx":427
 *     v1a,v1b,v1c=obj_volume_6d(obj1)
 *     vol2=obj_volume_6d_numerical(obj1)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('      obj1, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         print('                   = ',obj_volume_6d_numerical(obj1))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":428
 *     vol2=obj_volume_6d_numerical(obj1)
 *     if verbose>1:
 *         print('      obj1, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))             # <<<<<<<<<<<<<<
 *         print('                   = ',obj_volume_6d_numerical(obj1))
 *     else:
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_obj1_volume);
    __pyx_t_9 += 21;
    __Pyx_GIVEREF(__pyx_kp_u_obj1_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_obj1_volume);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__7);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__7);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __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;

    /* "pyqcstrc/icosah/intsct.pyx":429
 *     if verbose>1:
 *         print('      obj1, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         print('                   = ',obj_volume_6d_numerical(obj1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u__8);
    __Pyx_GIVEREF(__pyx_kp_u__8);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __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;

    /* "pyqcstrc/icosah/intsct.pyx":427
 *     v1a,v1b,v1c=obj_volume_6d(obj1)
 *     vol2=obj_volume_6d_numerical(obj1)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('      obj1, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         print('                   = ',obj_volume_6d_numerical(obj1))
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/intsct.pyx":431
 *         print('                   = ',obj_volume_6d_numerical(obj1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     v1a,v1b,v1c=obj_volume_6d(obj2)
 *     vol2=obj_volume_6d_numerical(obj2)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/intsct.pyx":432
 *     else:
 *         pass
 *     v1a,v1b,v1c=obj_volume_6d(obj2)             # <<<<<<<<<<<<<<
 *     vol2=obj_volume_6d_numerical(obj2)
 *     if verbose>1:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj2), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    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(0, 432, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 432, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_v1a = __pyx_t_8;
  __pyx_v_v1b = __pyx_t_7;
  __pyx_v_v1c = __pyx_t_6;

  /* "pyqcstrc/icosah/intsct.pyx":433
 *         pass
 *     v1a,v1b,v1c=obj_volume_6d(obj2)
 *     vol2=obj_volume_6d_numerical(obj2)             # <<<<<<<<<<<<<<
 *     if verbose>1:
 *         print('      obj2, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 */
  __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj2), 0);

  /* "pyqcstrc/icosah/intsct.pyx":434
 *     v1a,v1b,v1c=obj_volume_6d(obj2)
 *     vol2=obj_volume_6d_numerical(obj2)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('      obj2, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":435
 *     vol2=obj_volume_6d_numerical(obj2)
 *     if verbose>1:
 *         print('      obj2, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_obj2_volume);
    __pyx_t_9 += 21;
    __Pyx_GIVEREF(__pyx_kp_u_obj2_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_obj2_volume);
    __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
    __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__7);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__7);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __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;

    /* "pyqcstrc/icosah/intsct.pyx":434
 *     v1a,v1b,v1c=obj_volume_6d(obj2)
 *     vol2=obj_volume_6d_numerical(obj2)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('      obj2, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *     else:
 */
    goto __pyx_L5;
  }

  /* "pyqcstrc/icosah/intsct.pyx":437
 *         print('      obj2, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     counter3=0
 */
  /*else*/ {
  }
  __pyx_L5:;

  /* "pyqcstrc/icosah/intsct.pyx":439
 *         pass
 * 
 *     counter3=0             # <<<<<<<<<<<<<<
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])
 */
  __pyx_v_counter3 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":440
 * 
 *     counter3=0
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1c=np.array([0])
 *     tmp4_common=np.array([[[[0]]]])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __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_5numpy_ndarray))))) __PYX_ERR(0, 440, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
    }
    __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 440, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":441
 *     counter3=0
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp4_common=np.array([[[[0]]]])
 *     for i1 in range(len(obj1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __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(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 441, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
      __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 441, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":442
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])
 *     tmp4_common=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 *         # volume check
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __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(0, 442, __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_5numpy_ndarray))))) __PYX_ERR(0, 442, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
    }
    __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 442, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp4_common = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":443
 *     tmp1c=np.array([0])
 *     tmp4_common=np.array([[[[0]]]])
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         # volume check
 *         v1a,v1b,v1c=tetrahedron_volume_6d(obj1[i1])
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 443, __pyx_L1_error)
  __pyx_t_17 = __pyx_t_9;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_17; __pyx_t_12+=1) {
    __pyx_v_i1 = __pyx_t_12;

    /* "pyqcstrc/icosah/intsct.pyx":445
 *     for i1 in range(len(obj1)):
 *         # volume check
 *         v1a,v1b,v1c=tetrahedron_volume_6d(obj1[i1])             # <<<<<<<<<<<<<<
 *         vol1=tetrahedron_volume_6d_numerical(obj1[i1])
 *         if verbose>1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 445, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_t_2), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_3 != Py_None)) {
      PyObject* sequence = __pyx_t_3;
      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(0, 445, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = 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_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 445, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_v1a = __pyx_t_6;
    __pyx_v_v1b = __pyx_t_7;
    __pyx_v_v1c = __pyx_t_8;

    /* "pyqcstrc/icosah/intsct.pyx":446
 *         # volume check
 *         v1a,v1b,v1c=tetrahedron_volume_6d(obj1[i1])
 *         vol1=tetrahedron_volume_6d_numerical(obj1[i1])             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('      %2d-th tetrahedron in obj1, %d %d %d (%10.8f)'%(i1,v1a,v1b,v1c,vol1))
 */
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 446, __pyx_L1_error)
    __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_t_3), 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":447
 *         v1a,v1b,v1c=tetrahedron_volume_6d(obj1[i1])
 *         vol1=tetrahedron_volume_6d_numerical(obj1[i1])
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('      %2d-th tetrahedron in obj1, %d %d %d (%10.8f)'%(i1,v1a,v1b,v1c,vol1))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":448
 *         vol1=tetrahedron_volume_6d_numerical(obj1[i1])
 *         if verbose>1:
 *             print('      %2d-th tetrahedron in obj1, %d %d %d (%10.8f)'%(i1,v1a,v1b,v1c,vol1))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyTuple_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u__9);
      __pyx_t_18 += 6;
      __Pyx_GIVEREF(__pyx_kp_u__9);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__9);
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 2, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u_th_tetrahedron_in_obj1);
      __pyx_t_18 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_th_tetrahedron_in_obj1);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_th_tetrahedron_in_obj1);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__5);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__5);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__6);
      __pyx_t_18 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__6);
      PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_kp_u__6);
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__7);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__7);
      PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_kp_u__7);
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 11, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __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;

      /* "pyqcstrc/icosah/intsct.pyx":447
 *         v1a,v1b,v1c=tetrahedron_volume_6d(obj1[i1])
 *         vol1=tetrahedron_volume_6d_numerical(obj1[i1])
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('      %2d-th tetrahedron in obj1, %d %d %d (%10.8f)'%(i1,v1a,v1b,v1c,vol1))
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":450
 *             print('      %2d-th tetrahedron in obj1, %d %d %d (%10.8f)'%(i1,v1a,v1b,v1c,vol1))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i2 in range(len(obj2)):
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/intsct.pyx":451
 *         else:
 *             pass
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj2)):
 *             if verbose>1:
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":452
 *             pass
 *         counter1=0
 *         for i2 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *             if verbose>1:
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])
 */
    __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 452, __pyx_L1_error)
    __pyx_t_19 = __pyx_t_18;
    for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
      __pyx_v_i2 = __pyx_t_20;

      /* "pyqcstrc/icosah/intsct.pyx":453
 *         counter1=0
 *         for i2 in range(len(obj2)):
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])
 *                 vol2=tetrahedron_volume_6d_numerical(obj2[i2])
 */
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":454
 *         for i2 in range(len(obj2)):
 *             if verbose>1:
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])             # <<<<<<<<<<<<<<
 *                 vol2=tetrahedron_volume_6d_numerical(obj2[i2])
 *                 print('      %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 454, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 454, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 454, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_v2a = __pyx_t_8;
        __pyx_v_v2b = __pyx_t_7;
        __pyx_v_v2c = __pyx_t_6;

        /* "pyqcstrc/icosah/intsct.pyx":455
 *             if verbose>1:
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])
 *                 vol2=tetrahedron_volume_6d_numerical(obj2[i2])             # <<<<<<<<<<<<<<
 *                 print('      %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 *             else:
 */
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 455, __pyx_L1_error)
        __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_t_4), 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":456
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])
 *                 vol2=tetrahedron_volume_6d_numerical(obj2[i2])
 *                 print('      %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_4 = PyTuple_New(11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_21 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u__9);
        __pyx_t_21 += 6;
        __Pyx_GIVEREF(__pyx_kp_u__9);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__9);
        __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 2, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u_th_tetrahedron_in_obj2);
        __pyx_t_21 += 25;
        __Pyx_GIVEREF(__pyx_kp_u_th_tetrahedron_in_obj2);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_th_tetrahedron_in_obj2);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v2a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_21 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__5);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v2b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_21 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__5);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v2c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_21 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_kp_u__6);
        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10;
        __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_21 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_4, 10, __pyx_kp_u__7);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 11, __pyx_t_21, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __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_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":453
 *         counter1=0
 *         for i2 in range(len(obj2)):
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 v2a,v2b,v2c=tetrahedron_volume_6d(obj2[i2])
 *                 vol2=tetrahedron_volume_6d_numerical(obj2[i2])
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/intsct.pyx":458
 *                 print('      %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             tmp4_common=intersection_two_tetrahedron_4(obj1[i1],obj2[i2],verbose-1)
 * 
 */
      /*else*/ {
      }
      __pyx_L11:;

      /* "pyqcstrc/icosah/intsct.pyx":459
 *             else:
 *                 pass
 *             tmp4_common=intersection_two_tetrahedron_4(obj1[i1],obj2[i2],verbose-1)             # <<<<<<<<<<<<<<
 * 
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 */
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 459, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 459, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 459, __pyx_L1_error)
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __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_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
        __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_22 < 0)) {
          PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
          }
          __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
        }
        __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_22 < 0)) __PYX_ERR(0, 459, __pyx_L1_error)
      }
      __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":461
 *             tmp4_common=intersection_two_tetrahedron_4(obj1[i1],obj2[i2],verbose-1)
 * 
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":462
 * 
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":463
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *                 if counter1==0:
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1c=np.append(tmp1c,tmp4_common)
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp4_common)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
          __pyx_t_2 = PyInt_FromSsize_t((72 * __pyx_t_21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 463, __pyx_L1_error)
          __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
            __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_22 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              }
              __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
            }
            __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_22 < 0)) __PYX_ERR(0, 463, __pyx_L1_error)
          }
          __pyx_t_11 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":462
 * 
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *                 else:
 */
          goto __pyx_L13;
        }

        /* "pyqcstrc/icosah/intsct.pyx":465
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *                 else:
 *                     tmp1c=np.append(tmp1c,tmp4_common)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          __pyx_t_22 = 0;
          if (CYTHON_UNPACK_METHODS && 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_22 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp4_common)};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp4_common)};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_4) {
              __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_22, ((PyObject *)__pyx_v_tmp1c));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4_common));
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_22, ((PyObject *)__pyx_v_tmp4_common));
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __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;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 465, __pyx_L1_error)
          __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
            __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_22 < 0)) {
              PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
              }
              __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
            }
            __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_22 < 0)) __PYX_ERR(0, 465, __pyx_L1_error)
          }
          __pyx_t_11 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;
        }
        __pyx_L13:;

        /* "pyqcstrc/icosah/intsct.pyx":466
 *                 else:
 *                     tmp1c=np.append(tmp1c,tmp4_common)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/intsct.pyx":461
 *             tmp4_common=intersection_two_tetrahedron_4(obj1[i1],obj2[i2],verbose-1)
 * 
 *             if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 */
        goto __pyx_L12;
      }

      /* "pyqcstrc/icosah/intsct.pyx":468
 *                 counter1+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *         if counter1!=0:
 */
      /*else*/ {
      }
      __pyx_L12:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":470
 *                 pass
 * 
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *             #if option==0:
 */
    __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":471
 * 
 *         if counter1!=0:
 *             tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             #if option==0:
 *                 ####################
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 471, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_18) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_20 = 0;
      if (CYTHON_UNPACK_METHODS && 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_20 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_23 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_23);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_20, __pyx_t_3);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_20, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_23, 2+__pyx_t_20, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_23, 3+__pyx_t_20, __pyx_int_3);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 471, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_20 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
          __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
        }
        __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 471, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":481
 *                 #pass
 *             # volume check
 *             v3a,v3b,v3c=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *             vol3=(v3a+v3b*TAU)/(v3c)
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2
 */
      __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(__pyx_t_5 != Py_None)) {
        PyObject* sequence = __pyx_t_5;
        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(0, 481, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_23 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_23);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_23 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 481, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_23); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_v3a = __pyx_t_6;
      __pyx_v_v3b = __pyx_t_7;
      __pyx_v_v3c = __pyx_t_8;

      /* "pyqcstrc/icosah/intsct.pyx":482
 *             # volume check
 *             v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *             vol3=(v3a+v3b*TAU)/(v3c)             # <<<<<<<<<<<<<<
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2
 *                 if verbose>1:
 */
      __pyx_t_24 = (__pyx_v_v3a + (__pyx_v_v3b * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
      if (unlikely(__pyx_v_v3c == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 482, __pyx_L1_error)
      }
      __pyx_v_vol3 = (__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3c));

      /* "pyqcstrc/icosah/intsct.pyx":483
 *             v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *             vol3=(v3a+v3b*TAU)/(v3c)
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
      __pyx_t_25 = ((__pyx_v_v3a == __pyx_v_v1a) != 0);
      if (__pyx_t_25) {
      } else {
        __pyx_t_1 = __pyx_t_25;
        goto __pyx_L16_bool_binop_done;
      }
      __pyx_t_25 = ((__pyx_v_v3b == __pyx_v_v1b) != 0);
      if (__pyx_t_25) {
      } else {
        __pyx_t_1 = __pyx_t_25;
        goto __pyx_L16_bool_binop_done;
      }
      __pyx_t_25 = ((__pyx_v_v3c == __pyx_v_v1c) != 0);
      __pyx_t_1 = __pyx_t_25;
      __pyx_L16_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":484
 *             vol3=(v3a+v3b*TAU)/(v3c)
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":485
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2
 *                 if verbose>1:
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_18 = 0;
          __pyx_t_10 = 127;
          __Pyx_INCREF(__pyx_kp_u_common_part_all_1);
          __pyx_t_18 += 38;
          __Pyx_GIVEREF(__pyx_kp_u_common_part_all_1);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part_all_1);
          __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_18 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
          __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_18 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
          __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__6);
          __pyx_t_18 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__6);
          PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
          __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_23 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) : __pyx_t_10;
          __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
          __Pyx_GIVEREF(__pyx_t_23);
          PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_23);
          __pyx_t_23 = 0;
          __Pyx_INCREF(__pyx_kp_u__7);
          __pyx_t_18 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__7);
          PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
          __pyx_t_23 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":484
 *             vol3=(v3a+v3b*TAU)/(v3c)
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
          goto __pyx_L19;
        }

        /* "pyqcstrc/icosah/intsct.pyx":487
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if counter3==0:
 *                     tmp1b=obj1[i1].reshape(72)
 */
        /*else*/ {
        }
        __pyx_L19:;

        /* "pyqcstrc/icosah/intsct.pyx":488
 *                 else:
 *                     pass
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=obj1[i1].reshape(72)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":489
 *                     pass
 *                 if counter3==0:
 *                     tmp1b=obj1[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1b=np.append(tmp1b,obj1[i1])
 */
          __pyx_t_23 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
          __pyx_t_23 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_23)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_23);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_5 = (__pyx_t_23) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_23, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 489, __pyx_L1_error)
          __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_20 < 0)) {
              PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
              }
              __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
          }
          __pyx_t_11 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":488
 *                 else:
 *                     pass
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     tmp1b=obj1[i1].reshape(72)
 *                 else:
 */
          goto __pyx_L20;
        }

        /* "pyqcstrc/icosah/intsct.pyx":491
 *                     tmp1b=obj1[i1].reshape(72)
 *                 else:
 *                     tmp1b=np.append(tmp1b,obj1[i1])             # <<<<<<<<<<<<<<
 *                 counter3+=1
 *             else: # to avoid overflow
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 491, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          __pyx_t_20 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_23))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_23);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_23, function);
              __pyx_t_20 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_23)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), __pyx_t_3};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_23)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), __pyx_t_3};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_20, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 491, __pyx_L1_error)
          __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_20 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              }
              __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
            }
            __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
          }
          __pyx_t_11 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;
        }
        __pyx_L20:;

        /* "pyqcstrc/icosah/intsct.pyx":492
 *                 else:
 *                     tmp1b=np.append(tmp1b,obj1[i1])
 *                 counter3+=1             # <<<<<<<<<<<<<<
 *             else: # to avoid overflow
 *                 vol4=obj_volume_6d_numerical(tmp4a)
 */
        __pyx_v_counter3 = (__pyx_v_counter3 + 1);

        /* "pyqcstrc/icosah/intsct.pyx":483
 *             v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *             vol3=(v3a+v3b*TAU)/(v3c)
 *             if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  obj1[i1]obj2             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('                 common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
        goto __pyx_L15;
      }

      /* "pyqcstrc/icosah/intsct.pyx":494
 *                 counter3+=1
 *             else: # to avoid overflow
 *                 vol4=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *                 if abs(vol1-vol4)<=1e-8:
 *                     if verbose>1:
 */
      /*else*/ {
        __pyx_v_vol4 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

        /* "pyqcstrc/icosah/intsct.pyx":495
 *             else: # to avoid overflow
 *                 vol4=obj_volume_6d_numerical(tmp4a)
 *                 if abs(vol1-vol4)<=1e-8:             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))
 */
        __pyx_t_1 = ((fabs((__pyx_v_vol1 - __pyx_v_vol4)) <= 1e-8) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":496
 *                 vol4=obj_volume_6d_numerical(tmp4a)
 *                 if abs(vol1-vol4)<=1e-8:
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":497
 *                 if abs(vol1-vol4)<=1e-8:
 *                     if verbose>1:
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_18 = 0;
            __pyx_t_10 = 127;
            __Pyx_INCREF(__pyx_kp_u_common_part_all_2);
            __pyx_t_18 += 38;
            __Pyx_GIVEREF(__pyx_kp_u_common_part_all_2);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part_all_2);
            __pyx_t_23 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
            __Pyx_GIVEREF(__pyx_t_23);
            PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_23);
            __pyx_t_23 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_18 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
            __pyx_t_23 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
            __Pyx_GIVEREF(__pyx_t_23);
            PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_23);
            __pyx_t_23 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_18 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
            __pyx_t_23 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
            __Pyx_GIVEREF(__pyx_t_23);
            PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_23);
            __pyx_t_23 = 0;
            __Pyx_INCREF(__pyx_kp_u__6);
            __pyx_t_18 += 2;
            __Pyx_GIVEREF(__pyx_kp_u__6);
            PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
            __pyx_t_23 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_23, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_INCREF(__pyx_kp_u__7);
            __pyx_t_18 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__7);
            PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
            __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __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_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __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;

            /* "pyqcstrc/icosah/intsct.pyx":496
 *                 vol4=obj_volume_6d_numerical(tmp4a)
 *                 if abs(vol1-vol4)<=1e-8:
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))
 *                     else:
 */
            goto __pyx_L22;
          }

          /* "pyqcstrc/icosah/intsct.pyx":499
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     if counter3==0:
 *                         tmp1b=obj1[i1].reshape(72)
 */
          /*else*/ {
          }
          __pyx_L22:;

          /* "pyqcstrc/icosah/intsct.pyx":500
 *                     else:
 *                         pass
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=obj1[i1].reshape(72)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":501
 *                         pass
 *                     if counter3==0:
 *                         tmp1b=obj1[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1])
 */
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_23);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_23, function);
              }
            }
            __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_23, __pyx_t_4, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_23, __pyx_int_72);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 501, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                  Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                  __Pyx_RaiseBufferFallbackError();
                } else {
                  PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                }
                __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
              }
              __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":500
 *                     else:
 *                         pass
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=obj1[i1].reshape(72)
 *                     else:
 */
            goto __pyx_L23;
          }

          /* "pyqcstrc/icosah/intsct.pyx":503
 *                         tmp1b=obj1[i1].reshape(72)
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1])             # <<<<<<<<<<<<<<
 *                     counter3+=1
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_n_s_np); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __pyx_t_23 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_3 = NULL;
            __pyx_t_20 = 0;
            if (CYTHON_UNPACK_METHODS && 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_20 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_23};
              __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_23};
              __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              if (__pyx_t_3) {
                __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
              }
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
              PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(__pyx_t_23);
              PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_20, __pyx_t_23);
              __pyx_t_23 = 0;
              __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __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;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 503, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                  Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                  __Pyx_RaiseBufferFallbackError();
                } else {
                  PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                }
                __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
              }
              __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
          }
          __pyx_L23:;

          /* "pyqcstrc/icosah/intsct.pyx":504
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1])
 *                     counter3+=1             # <<<<<<<<<<<<<<
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 *                     if abs(vol4-vol3)<1e-8:
 */
          __pyx_v_counter3 = (__pyx_v_counter3 + 1);

          /* "pyqcstrc/icosah/intsct.pyx":495
 *             else: # to avoid overflow
 *                 vol4=obj_volume_6d_numerical(tmp4a)
 *                 if abs(vol1-vol4)<=1e-8:             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('                 common part (all_2), %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol4))
 */
          goto __pyx_L21;
        }

        /* "pyqcstrc/icosah/intsct.pyx":505
 *                         tmp1b=np.append(tmp1b,obj1[i1])
 *                     counter3+=1
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:             # <<<<<<<<<<<<<<
 *                     if abs(vol4-vol3)<1e-8:
 *                         if verbose>1:
 */
        __pyx_t_25 = ((fabs((__pyx_v_vol1 - __pyx_v_vol4)) > 1e-8) != 0);
        if (__pyx_t_25) {
        } else {
          __pyx_t_1 = __pyx_t_25;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_25 = ((__pyx_v_vol4 >= 0.0) != 0);
        __pyx_t_1 = __pyx_t_25;
        __pyx_L24_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":506
 *                     counter3+=1
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 *                     if abs(vol4-vol3)<1e-8:             # <<<<<<<<<<<<<<
 *                         if verbose>1:
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 */
          __pyx_t_1 = ((fabs((__pyx_v_vol4 - __pyx_v_vol3)) < 1e-8) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":507
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 *                     if abs(vol4-vol3)<1e-8:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":508
 *                     if abs(vol4-vol3)<1e-8:
 *                         if verbose>1:
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_18 = 0;
              __pyx_t_10 = 127;
              __Pyx_INCREF(__pyx_kp_u_common_part_partial_1);
              __pyx_t_18 += 42;
              __Pyx_GIVEREF(__pyx_kp_u_common_part_partial_1);
              PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part_partial_1);
              __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_4);
              PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
              __pyx_t_4 = 0;
              __Pyx_INCREF(__pyx_kp_u__5);
              __pyx_t_18 += 1;
              __Pyx_GIVEREF(__pyx_kp_u__5);
              PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
              __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_4);
              PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
              __pyx_t_4 = 0;
              __Pyx_INCREF(__pyx_kp_u__5);
              __pyx_t_18 += 1;
              __Pyx_GIVEREF(__pyx_kp_u__5);
              PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
              __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_4);
              PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_4);
              __pyx_t_4 = 0;
              __Pyx_INCREF(__pyx_kp_u__6);
              __pyx_t_18 += 2;
              __Pyx_GIVEREF(__pyx_kp_u__6);
              PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
              __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
              __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_2);
              __pyx_t_2 = 0;
              __Pyx_INCREF(__pyx_kp_u__7);
              __pyx_t_18 += 1;
              __Pyx_GIVEREF(__pyx_kp_u__7);
              PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
              __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __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_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __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;

              /* "pyqcstrc/icosah/intsct.pyx":507
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 *                     if abs(vol4-vol3)<1e-8:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                         else:
 */
              goto __pyx_L27;
            }

            /* "pyqcstrc/icosah/intsct.pyx":510
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             tmp1b=tmp4a.reshape(len(tmp4a)*72)
 */
            /*else*/ {
            }
            __pyx_L27:;

            /* "pyqcstrc/icosah/intsct.pyx":511
 *                         else:
 *                             pass
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":512
 *                             pass
 *                         if counter3==0:
 *                             tmp1b=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp4a)
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 512, __pyx_L1_error)
              __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_18 * 72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_23 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_23)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_23);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                }
              }
              __pyx_t_5 = (__pyx_t_23) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_23, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
              __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __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_5numpy_ndarray))))) __PYX_ERR(0, 512, __pyx_L1_error)
              __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_20 < 0)) {
                  PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                  }
                  __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
                }
                __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 512, __pyx_L1_error)
              }
              __pyx_t_11 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
              __pyx_t_5 = 0;

              /* "pyqcstrc/icosah/intsct.pyx":511
 *                         else:
 *                             pass
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 */
              goto __pyx_L28;
            }

            /* "pyqcstrc/icosah/intsct.pyx":514
 *                             tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp4a)             # <<<<<<<<<<<<<<
 *                         counter3+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = NULL;
              __pyx_t_20 = 0;
              if (CYTHON_UNPACK_METHODS && 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_20 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4a)};
                __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_GOTREF(__pyx_t_5);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4a)};
                __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_GOTREF(__pyx_t_5);
              } else
              #endif
              {
                __pyx_t_23 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 514, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                if (__pyx_t_2) {
                  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_2); __pyx_t_2 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
                PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
                PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_20, ((PyObject *)__pyx_v_tmp4a));
                __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 514, __pyx_L1_error)
              __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_20 < 0)) {
                  PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                  }
                  __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
                }
                __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 514, __pyx_L1_error)
              }
              __pyx_t_11 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
              __pyx_t_5 = 0;
            }
            __pyx_L28:;

            /* "pyqcstrc/icosah/intsct.pyx":515
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp4a)
 *                         counter3+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp4b=tmp4a
 */
            __pyx_v_counter3 = (__pyx_v_counter3 + 1);

            /* "pyqcstrc/icosah/intsct.pyx":506
 *                     counter3+=1
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:
 *                     if abs(vol4-vol3)<1e-8:             # <<<<<<<<<<<<<<
 *                         if verbose>1:
 *                             print('                 common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 */
            goto __pyx_L26;
          }

          /* "pyqcstrc/icosah/intsct.pyx":517
 *                         counter3+=1
 *                     else:
 *                         tmp4b=tmp4a             # <<<<<<<<<<<<<<
 *                         vol4=obj_volume_6d_numerical(tmp4b)
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)
 */
          /*else*/ {
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
              __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                  Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                  __Pyx_RaiseBufferFallbackError();
                } else {
                  PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                }
                __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
              }
              __pyx_pybuffernd_tmp4b.diminfo[0].strides = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4b.diminfo[0].shape = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4b.diminfo[1].strides = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4b.diminfo[1].shape = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4b.diminfo[2].strides = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4b.diminfo[2].shape = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4b.diminfo[3].strides = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4b.diminfo[3].shape = __pyx_pybuffernd_tmp4b.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 517, __pyx_L1_error)
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
            __Pyx_XDECREF_SET(__pyx_v_tmp4b, __pyx_v_tmp4a);

            /* "pyqcstrc/icosah/intsct.pyx":518
 *                     else:
 *                         tmp4b=tmp4a
 *                         vol4=obj_volume_6d_numerical(tmp4b)             # <<<<<<<<<<<<<<
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 */
            __pyx_v_vol4 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4b), 0);

            /* "pyqcstrc/icosah/intsct.pyx":519
 *                         tmp4b=tmp4a
 *                         vol4=obj_volume_6d_numerical(tmp4b)
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)             # <<<<<<<<<<<<<<
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 *                         if abs(vol4-vol3)<1e-8:
 */
            __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4b), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            if (likely(__pyx_t_5 != Py_None)) {
              PyObject* sequence = __pyx_t_5;
              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(0, 519, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_23 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_23);
              __Pyx_INCREF(__pyx_t_2);
              #else
              __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_23 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 519, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_23);
              __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 519, __pyx_L1_error)
            }
            __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_23); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_v_v3a = __pyx_t_8;
            __pyx_v_v3b = __pyx_t_7;
            __pyx_v_v3c = __pyx_t_6;

            /* "pyqcstrc/icosah/intsct.pyx":520
 *                         vol4=obj_volume_6d_numerical(tmp4b)
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)
 *                         vol3=(v3a+v3b*TAU)/(v3c)             # <<<<<<<<<<<<<<
 *                         if abs(vol4-vol3)<1e-8:
 *                             if verbose>1:
 */
            __pyx_t_24 = (__pyx_v_v3a + (__pyx_v_v3b * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
            if (unlikely(__pyx_v_v3c == 0)) {
              PyErr_SetString(PyExc_ZeroDivisionError, "float division");
              __PYX_ERR(0, 520, __pyx_L1_error)
            }
            __pyx_v_vol3 = (__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3c));

            /* "pyqcstrc/icosah/intsct.pyx":521
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 *                         if abs(vol4-vol3)<1e-8:             # <<<<<<<<<<<<<<
 *                             if verbose>1:
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 */
            __pyx_t_1 = ((fabs((__pyx_v_vol4 - __pyx_v_vol3)) < 1e-8) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/intsct.pyx":522
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 *                         if abs(vol4-vol3)<1e-8:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 */
              __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/intsct.pyx":523
 *                         if abs(vol4-vol3)<1e-8:
 *                             if verbose>1:
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_18 = 0;
                __pyx_t_10 = 127;
                __Pyx_INCREF(__pyx_kp_u_common_part_partial_2);
                __pyx_t_18 += 42;
                __Pyx_GIVEREF(__pyx_kp_u_common_part_partial_2);
                PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part_partial_2);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__5);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__5);
                PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__5);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__5);
                PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__6);
                __pyx_t_18 += 2;
                __Pyx_GIVEREF(__pyx_kp_u__6);
                PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
                __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_23 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) : __pyx_t_10;
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
                __Pyx_GIVEREF(__pyx_t_23);
                PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_23);
                __pyx_t_23 = 0;
                __Pyx_INCREF(__pyx_kp_u__7);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__7);
                PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
                __pyx_t_23 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/intsct.pyx":522
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 *                         if abs(vol4-vol3)<1e-8:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 */
                goto __pyx_L30;
              }

              /* "pyqcstrc/icosah/intsct.pyx":525
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                             if counter3==0:
 *                                 tmp1b=tmp4b.reshape(len(tmp4b)*72)
 */
              /*else*/ {
              }
              __pyx_L30:;

              /* "pyqcstrc/icosah/intsct.pyx":526
 *                             else:
 *                                 pass
 *                             if counter3==0:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4b.reshape(len(tmp4b)*72)
 *                             else:
 */
              __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/intsct.pyx":527
 *                                 pass
 *                             if counter3==0:
 *                                 tmp1b=tmp4b.reshape(len(tmp4b)*72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4b)
 */
                __pyx_t_23 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 527, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 527, __pyx_L1_error)
                __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_18 * 72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_23);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_23, function);
                  }
                }
                __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_23, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_23, __pyx_t_2);
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 527, __pyx_L1_error)
                __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                    }
                    __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
                  }
                  __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 527, __pyx_L1_error)
                }
                __pyx_t_11 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
                __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/intsct.pyx":526
 *                             else:
 *                                 pass
 *                             if counter3==0:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4b.reshape(len(tmp4b)*72)
 *                             else:
 */
                goto __pyx_L31;
              }

              /* "pyqcstrc/icosah/intsct.pyx":529
 *                                 tmp1b=tmp4b.reshape(len(tmp4b)*72)
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4b)             # <<<<<<<<<<<<<<
 *                             counter3+=1
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_n_s_np); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 529, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                __pyx_t_23 = NULL;
                __pyx_t_20 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_23)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_23);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                    __pyx_t_20 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_2)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_23, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4b)};
                  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_23, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4b)};
                  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else
                #endif
                {
                  __pyx_t_4 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  if (__pyx_t_23) {
                    __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_23); __pyx_t_23 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
                  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4b));
                  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_20, ((PyObject *)__pyx_v_tmp4b));
                  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 529, __pyx_L1_error)
                __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                    }
                    __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
                  }
                  __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 529, __pyx_L1_error)
                }
                __pyx_t_11 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
                __pyx_t_5 = 0;
              }
              __pyx_L31:;

              /* "pyqcstrc/icosah/intsct.pyx":530
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4b)
 *                             counter3+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             if verbose>1:
 */
              __pyx_v_counter3 = (__pyx_v_counter3 + 1);

              /* "pyqcstrc/icosah/intsct.pyx":521
 *                         v3a,v3b,v3c=obj_volume_6d(tmp4b)
 *                         vol3=(v3a+v3b*TAU)/(v3c)
 *                         if abs(vol4-vol3)<1e-8:             # <<<<<<<<<<<<<<
 *                             if verbose>1:
 *                                 print('                 common part (partial_2), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 */
              goto __pyx_L29;
            }

            /* "pyqcstrc/icosah/intsct.pyx":532
 *                             counter3+=1
 *                         else:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('                 common part (partial_3), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 */
            /*else*/ {
              __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/intsct.pyx":533
 *                         else:
 *                             if verbose>1:
 *                                 print('                 common part (partial_3), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_18 = 0;
                __pyx_t_10 = 127;
                __Pyx_INCREF(__pyx_kp_u_common_part_partial_3);
                __pyx_t_18 += 42;
                __Pyx_GIVEREF(__pyx_kp_u_common_part_partial_3);
                PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part_partial_3);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__5);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__5);
                PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__5);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__5);
                PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
                __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2);
                __pyx_t_2 = 0;
                __Pyx_INCREF(__pyx_kp_u__6);
                __pyx_t_18 += 2;
                __Pyx_GIVEREF(__pyx_kp_u__6);
                PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
                __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
                __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_4);
                __pyx_t_4 = 0;
                __Pyx_INCREF(__pyx_kp_u__7);
                __pyx_t_18 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__7);
                PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
                __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __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_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __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;

                /* "pyqcstrc/icosah/intsct.pyx":532
 *                             counter3+=1
 *                         else:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('                 common part (partial_3), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 */
                goto __pyx_L32;
              }

              /* "pyqcstrc/icosah/intsct.pyx":535
 *                                 print('                 common part (partial_3), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol4))
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                             if counter3==0:
 *                                 tmp1b=tmp4a.reshape(len(tmp4a)*72)
 */
              /*else*/ {
              }
              __pyx_L32:;

              /* "pyqcstrc/icosah/intsct.pyx":536
 *                             else:
 *                                 pass
 *                             if counter3==0:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 */
              __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/intsct.pyx":537
 *                                 pass
 *                             if counter3==0:
 *                                 tmp1b=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4a)
 */
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 537, __pyx_L1_error)
                __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_18 * 72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_23 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_23)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_23);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                __pyx_t_5 = (__pyx_t_23) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_23, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
                __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 537, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 537, __pyx_L1_error)
                __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                    }
                    __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
                  }
                  __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 537, __pyx_L1_error)
                }
                __pyx_t_11 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
                __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/intsct.pyx":536
 *                             else:
 *                                 pass
 *                             if counter3==0:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 */
                goto __pyx_L33;
              }

              /* "pyqcstrc/icosah/intsct.pyx":539
 *                                 tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4a)             # <<<<<<<<<<<<<<
 *                             counter3+=1
 *                 else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                __pyx_t_20 = 0;
                if (CYTHON_UNPACK_METHODS && 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_20 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_2)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4a)};
                  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4a)};
                  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else
                #endif
                {
                  __pyx_t_23 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 539, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_23);
                  if (__pyx_t_4) {
                    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_4); __pyx_t_4 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
                  PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
                  PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_20, ((PyObject *)__pyx_v_tmp4a));
                  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 539, __pyx_L1_error)
                __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                    }
                    __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
                  }
                  __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 539, __pyx_L1_error)
                }
                __pyx_t_11 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
                __pyx_t_5 = 0;
              }
              __pyx_L33:;

              /* "pyqcstrc/icosah/intsct.pyx":540
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4a)
 *                             counter3+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     if verbose>1:
 */
              __pyx_v_counter3 = (__pyx_v_counter3 + 1);
            }
            __pyx_L29:;
          }
          __pyx_L26:;

          /* "pyqcstrc/icosah/intsct.pyx":505
 *                         tmp1b=np.append(tmp1b,obj1[i1])
 *                     counter3+=1
 *                 elif abs(vol1-vol4)>1e-8 and vol4>=0.0:             # <<<<<<<<<<<<<<
 *                     if abs(vol4-vol3)<1e-8:
 *                         if verbose>1:
 */
          goto __pyx_L21;
        }

        /* "pyqcstrc/icosah/intsct.pyx":542
 *                             counter3+=1
 *                 else:
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('                 common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                         print('                 numerical value, %10.8f'%(vol4))
 */
        /*else*/ {
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":543
 *                 else:
 *                     if verbose>1:
 *                         print('                 common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))             # <<<<<<<<<<<<<<
 *                         print('                 numerical value, %10.8f'%(vol4))
 *                     else:
 */
            __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_18 = 0;
            __pyx_t_10 = 127;
            __Pyx_INCREF(__pyx_kp_u_common_part);
            __pyx_t_18 += 30;
            __Pyx_GIVEREF(__pyx_kp_u_common_part);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_part);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_18 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_18 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__6);
            __pyx_t_18 += 2;
            __Pyx_GIVEREF(__pyx_kp_u__6);
            PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
            __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_23 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) : __pyx_t_10;
            __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23);
            __Pyx_GIVEREF(__pyx_t_23);
            PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_23);
            __pyx_t_23 = 0;
            __Pyx_INCREF(__pyx_kp_u_out_of_expected);
            __pyx_t_18 += 18;
            __Pyx_GIVEREF(__pyx_kp_u_out_of_expected);
            PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u_out_of_expected);
            __pyx_t_23 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":544
 *                     if verbose>1:
 *                         print('                 common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                         print('                 numerical value, %10.8f'%(vol4))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_23 = PyUnicode_Format(__pyx_kp_u_numerical_value_10_8f, __pyx_t_5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 544, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_23);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":542
 *                             counter3+=1
 *                 else:
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('                 common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                         print('                 numerical value, %10.8f'%(vol4))
 */
            goto __pyx_L34;
          }

          /* "pyqcstrc/icosah/intsct.pyx":546
 *                         print('                 numerical value, %10.8f'%(vol4))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     pass
 *         else: # if common part (obj1_reduced and obj2) is NOT empty
 */
          /*else*/ {
          }
          __pyx_L34:;
        }
        __pyx_L21:;
      }
      __pyx_L15:;

      /* "pyqcstrc/icosah/intsct.pyx":470
 *                 pass
 * 
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *             #if option==0:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/intsct.pyx":549
 *                     pass
 *         else: # if common part (obj1_reduced and obj2) is NOT empty
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('                 common part, empty')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":550
 *         else: # if common part (obj1_reduced and obj2) is NOT empty
 *             if verbose>1:
 *                 print('                 common part, empty')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":549
 *                     pass
 *         else: # if common part (obj1_reduced and obj2) is NOT empty
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('                 common part, empty')
 *             else:
 */
        goto __pyx_L35;
      }

      /* "pyqcstrc/icosah/intsct.pyx":552
 *                 print('                 common part, empty')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
      /*else*/ {
      }
      __pyx_L35:;
    }
    __pyx_L14:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":555
 *             pass
 * 
 *     if counter3!=0:             # <<<<<<<<<<<<<<
 *         tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 */
  __pyx_t_1 = ((__pyx_v_counter3 != 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":556
 * 
 *     if counter3!=0:
 *         tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *         vol2=obj_volume_6d_numerical(tmp4_common)
 */
    __pyx_t_23 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 556, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 72.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_23);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_23, function);
        __pyx_t_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_23)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_23)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_23, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_12, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 556, __pyx_L1_error)
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        }
        __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
      }
      __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
      if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
    }
    __pyx_t_16 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":557
 *     if counter3!=0:
 *         tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)             # <<<<<<<<<<<<<<
 *         vol2=obj_volume_6d_numerical(tmp4_common)
 *         if verbose>1:
 */
    __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4_common), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(__pyx_t_5 != Py_None)) {
      PyObject* sequence = __pyx_t_5;
      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(0, 557, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_23 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_23);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_23 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 557, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_23); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_v1a = __pyx_t_6;
    __pyx_v_v1b = __pyx_t_7;
    __pyx_v_v1c = __pyx_t_8;

    /* "pyqcstrc/icosah/intsct.pyx":558
 *         tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *         vol2=obj_volume_6d_numerical(tmp4_common)             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('      common obj, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 */
    __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4_common), 0);

    /* "pyqcstrc/icosah/intsct.pyx":559
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *         vol2=obj_volume_6d_numerical(tmp4_common)
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('      common obj, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":560
 *         vol2=obj_volume_6d_numerical(tmp4_common)
 *         if verbose>1:
 *             print('      common obj, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_common_obj_volume);
      __pyx_t_9 += 27;
      __Pyx_GIVEREF(__pyx_kp_u_common_obj_volume);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_common_obj_volume);
      __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
      __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
      __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__6);
      __pyx_t_9 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__6);
      PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__6);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__7);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__7);
      PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__7);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":559
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *         vol2=obj_volume_6d_numerical(tmp4_common)
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('      common obj, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         else:
 */
      goto __pyx_L37;
    }

    /* "pyqcstrc/icosah/intsct.pyx":562
 *             print('      common obj, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4_common
 *     else:
 */
    /*else*/ {
    }
    __pyx_L37:;

    /* "pyqcstrc/icosah/intsct.pyx":563
 *         else:
 *             pass
 *         return tmp4_common             # <<<<<<<<<<<<<<
 *     else:
 *         if tmp4_common.tolist()!=[[[[0]]]]:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":555
 *             pass
 * 
 *     if counter3!=0:             # <<<<<<<<<<<<<<
 *         tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":565
 *         return tmp4_common
 *     else:
 *         if tmp4_common.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             return tmp4_common
 *         else:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":566
 *     else:
 *         if tmp4_common.tolist()!=[[[[0]]]]:
 *             return tmp4_common             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/intsct.pyx":565
 *         return tmp4_common
 *     else:
 *         if tmp4_common.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             return tmp4_common
 *         else:
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":568
 *             return tmp4_common
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
      __pyx_t_23 = PyList_New(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_23, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_23);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_23);
      __pyx_t_23 = 0;
      __pyx_t_23 = PyList_New(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_23, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && 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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_23) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_23);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 568, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":407
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_using_tetrahedron_4(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     int verbose,
 */

  /* 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_23);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_using_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4_common);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_5intersection_using_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_5intersection_using_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  int __pyx_v_verbose;
  int __pyx_v_dummy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection_using_tetrahedron_4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_verbose,&__pyx_n_s_dummy,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_using_tetrahedron_4", 1, 4, 4, 1); __PYX_ERR(0, 407, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_using_tetrahedron_4", 1, 4, 4, 2); __PYX_ERR(0, 407, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dummy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_using_tetrahedron_4", 1, 4, 4, 3); __PYX_ERR(0, 407, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection_using_tetrahedron_4") < 0)) __PYX_ERR(0, 407, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_obj1 = ((PyArrayObject *)values[0]);
    __pyx_v_obj2 = ((PyArrayObject *)values[1]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 409, __pyx_L3_error)
    __pyx_v_dummy = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_dummy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 410, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection_using_tetrahedron_4", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 407, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_using_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj1), __pyx_ptype_5numpy_ndarray, 1, "obj1", 0))) __PYX_ERR(0, 407, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 408, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_4intersection_using_tetrahedron_4(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_verbose, __pyx_v_dummy);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_4intersection_using_tetrahedron_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, int __pyx_v_dummy) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj1;
  __Pyx_Buffer __pyx_pybuffer_obj1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  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("intersection_using_tetrahedron_4", 0);
  __pyx_pybuffer_obj1.pybuffer.buf = NULL;
  __pyx_pybuffer_obj1.refcount = 0;
  __pyx_pybuffernd_obj1.data = NULL;
  __pyx_pybuffernd_obj1.rcbuffer = &__pyx_pybuffer_obj1;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 407, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj1.diminfo[0].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj1.diminfo[0].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj1.diminfo[1].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj1.diminfo[1].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj1.diminfo[2].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj1.diminfo[2].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj1.diminfo[3].strides = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj1.diminfo[3].shape = __pyx_pybuffernd_obj1.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 407, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2.diminfo[0].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2.diminfo[0].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2.diminfo[1].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2.diminfo[1].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2.diminfo[2].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2.diminfo[2].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2.diminfo[3].strides = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2.diminfo[3].shape = __pyx_pybuffernd_obj2.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_verbose, __pyx_v_dummy, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_using_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":572
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_tetrahedron_obj_4(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=4] obj,
 *                                                 int flag3,
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_7intersection_tetrahedron_obj_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj, int __pyx_v_flag3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i2;
  int __pyx_v_counter1;
  long __pyx_v_v1a;
  long __pyx_v_v1b;
  long __pyx_v_v1c;
  long __pyx_v_v2a;
  long __pyx_v_v2b;
  long __pyx_v_v2c;
  long __pyx_v_v3a;
  long __pyx_v_v3b;
  long __pyx_v_v3c;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  double __pyx_v_vol3;
  double __pyx_v_dd1;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_cent1 = 0;
  PyArrayObject *__pyx_v_tmp4_common = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_cent1;
  __Pyx_Buffer __pyx_pybuffer_cent1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1c;
  __Pyx_Buffer __pyx_pybuffer_tmp1c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4_common;
  __Pyx_Buffer __pyx_pybuffer_tmp4_common;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  long __pyx_t_12;
  long __pyx_t_13;
  long __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_UCS4 __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_21;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_tetrahedron_obj_4", 0);
  __pyx_pybuffer_tmp1c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1c.refcount = 0;
  __pyx_pybuffernd_tmp1c.data = NULL;
  __pyx_pybuffernd_tmp1c.rcbuffer = &__pyx_pybuffer_tmp1c;
  __pyx_pybuffer_cent1.pybuffer.buf = NULL;
  __pyx_pybuffer_cent1.refcount = 0;
  __pyx_pybuffernd_cent1.data = NULL;
  __pyx_pybuffernd_cent1.rcbuffer = &__pyx_pybuffer_cent1;
  __pyx_pybuffer_tmp4_common.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4_common.refcount = 0;
  __pyx_pybuffernd_tmp4_common.data = NULL;
  __pyx_pybuffernd_tmp4_common.rcbuffer = &__pyx_pybuffer_tmp4_common;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 572, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 572, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":587
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4_common,tmp4a,tmp4b
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      intersection_tetrahedron_obj_4()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":588
 * 
 *     if verbose>0:
 *         print('      intersection_tetrahedron_obj_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":587
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4_common,tmp4a,tmp4b
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      intersection_tetrahedron_obj_4()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":590
 *         print('      intersection_tetrahedron_obj_4()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1c=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":592
 *         pass
 * 
 *     tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp4_common=np.array([[[[0]]]])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  __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(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 592, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
      __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 592, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":593
 * 
 *     tmp1c=np.array([0])
 *     tmp4_common=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 *     # volume check
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __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(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __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_5numpy_ndarray))))) __PYX_ERR(0, 593, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
      __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
    }
    __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 593, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp4_common = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":596
 * 
 *     # volume check
 *     v1a,v1b,v1c=tetrahedron_volume_6d(tetrahedron)             # <<<<<<<<<<<<<<
 *     vol1=tetrahedron_volume_6d_numerical(tetrahedron)
 *     if verbose>0:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    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(0, 596, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 596, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_v1a = __pyx_t_12;
  __pyx_v_v1b = __pyx_t_13;
  __pyx_v_v1c = __pyx_t_14;

  /* "pyqcstrc/icosah/intsct.pyx":597
 *     # volume check
 *     v1a,v1b,v1c=tetrahedron_volume_6d(tetrahedron)
 *     vol1=tetrahedron_volume_6d_numerical(tetrahedron)             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         print('       tetrahedron, %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol1))
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_v_tetrahedron), 0);

  /* "pyqcstrc/icosah/intsct.pyx":598
 *     v1a,v1b,v1c=tetrahedron_volume_6d(tetrahedron)
 *     vol1=tetrahedron_volume_6d_numerical(tetrahedron)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       tetrahedron, %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol1))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":599
 *     vol1=tetrahedron_volume_6d_numerical(tetrahedron)
 *     if verbose>0:
 *         print('       tetrahedron, %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = 0;
    __pyx_t_16 = 127;
    __Pyx_INCREF(__pyx_kp_u_tetrahedron);
    __pyx_t_15 += 20;
    __Pyx_GIVEREF(__pyx_kp_u_tetrahedron);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_tetrahedron);
    __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_15 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_15 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
    __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__6);
    __pyx_t_15 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__6);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_16;
    __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_t_15 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__7);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__7);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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;

    /* "pyqcstrc/icosah/intsct.pyx":598
 *     v1a,v1b,v1c=tetrahedron_volume_6d(tetrahedron)
 *     vol1=tetrahedron_volume_6d_numerical(tetrahedron)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       tetrahedron, %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol1))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/intsct.pyx":601
 *         print('       tetrahedron, %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if flag3==0:
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/intsct.pyx":603
 *         pass
 * 
 *     if flag3==0:             # <<<<<<<<<<<<<<
 *         cent1=centroid(tetrahedron)
 *         dd1=ball_radius(tetrahedron,cent1)
 */
  __pyx_t_1 = ((__pyx_v_flag3 == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":604
 * 
 *     if flag3==0:
 *         cent1=centroid(tetrahedron)             # <<<<<<<<<<<<<<
 *         dd1=ball_radius(tetrahedron,cent1)
 *     else:
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_v_tetrahedron), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer, (PyObject*)__pyx_v_cent1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
        __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
      }
      __pyx_pybuffernd_cent1.diminfo[0].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cent1.diminfo[0].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_cent1.diminfo[1].strides = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_cent1.diminfo[1].shape = __pyx_pybuffernd_cent1.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 604, __pyx_L1_error)
    }
    __pyx_v_cent1 = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":605
 *     if flag3==0:
 *         cent1=centroid(tetrahedron)
 *         dd1=ball_radius(tetrahedron,cent1)             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_v_dd1 = __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_cent1));

    /* "pyqcstrc/icosah/intsct.pyx":603
 *         pass
 * 
 *     if flag3==0:             # <<<<<<<<<<<<<<
 *         cent1=centroid(tetrahedron)
 *         dd1=ball_radius(tetrahedron,cent1)
 */
    goto __pyx_L5;
  }

  /* "pyqcstrc/icosah/intsct.pyx":607
 *         dd1=ball_radius(tetrahedron,cent1)
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     counter1=0
 */
  /*else*/ {
  }
  __pyx_L5:;

  /* "pyqcstrc/icosah/intsct.pyx":609
 *         pass
 * 
 *     counter1=0             # <<<<<<<<<<<<<<
 *     for i2 in range(len(obj)):
 *         if verbose>1:
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":610
 * 
 *     counter1=0
 *     for i2 in range(len(obj)):             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])
 */
  __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
  __pyx_t_17 = __pyx_t_15;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_17; __pyx_t_7+=1) {
    __pyx_v_i2 = __pyx_t_7;

    /* "pyqcstrc/icosah/intsct.pyx":611
 *     counter1=0
 *     for i2 in range(len(obj)):
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])
 *             vol2=tetrahedron_volume_6d_numerical(obj[i2])
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":612
 *     for i2 in range(len(obj)):
 *         if verbose>1:
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])             # <<<<<<<<<<<<<<
 *             vol2=tetrahedron_volume_6d_numerical(obj[i2])
 *             print('       %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 612, __pyx_L1_error)
      __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_t_2), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(__pyx_t_5 != Py_None)) {
        PyObject* sequence = __pyx_t_5;
        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(0, 612, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 612, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_v2a = __pyx_t_14;
      __pyx_v_v2b = __pyx_t_13;
      __pyx_v_v2c = __pyx_t_12;

      /* "pyqcstrc/icosah/intsct.pyx":613
 *         if verbose>1:
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])
 *             vol2=tetrahedron_volume_6d_numerical(obj[i2])             # <<<<<<<<<<<<<<
 *             print('       %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 *         else:
 */
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 613, __pyx_L1_error)
      __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_t_5), 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":614
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])
 *             vol2=tetrahedron_volume_6d_numerical(obj[i2])
 *             print('       %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = PyTuple_New(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 = 0;
      __pyx_t_16 = 127;
      __Pyx_INCREF(__pyx_kp_u__12);
      __pyx_t_18 += 7;
      __Pyx_GIVEREF(__pyx_kp_u__12);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__12);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 2, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_th_tetrahedron_in_obj2);
      __pyx_t_18 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_th_tetrahedron_in_obj2);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_th_tetrahedron_in_obj2);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v2a, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__5);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v2b, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__5);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v2c, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__6);
      __pyx_t_18 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__6);
      PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u__6);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_16;
      __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 9, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__7);
      __pyx_t_18 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__7);
      PyTuple_SET_ITEM(__pyx_t_5, 10, __pyx_kp_u__7);
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 11, __pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __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_print, __pyx_t_4); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":611
 *     counter1=0
 *     for i2 in range(len(obj)):
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             v2a,v2b,v2c=tetrahedron_volume_6d(obj[i2])
 *             vol2=tetrahedron_volume_6d_numerical(obj[i2])
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":616
 *             print('       %2d-th tetrahedron in obj2, %d %d %d (%10.8f)'%(i2,v2a,v2b,v2c,vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         if flag3==0: # filter ON
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/intsct.pyx":617
 *         else:
 *             pass
 *         if flag3==0: # filter ON             # <<<<<<<<<<<<<<
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 */
    __pyx_t_1 = ((__pyx_v_flag3 == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":618
 *             pass
 *         if flag3==0: # filter ON
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:             # <<<<<<<<<<<<<<
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 *             else:
 */
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 618, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_6intsct_rough_check_intersection_two_tetrahedron(((PyArrayObject *)__pyx_v_cent1), __pyx_v_dd1, ((PyArrayObject *)__pyx_t_5)) == 0) != 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":619
 *         if flag3==0: # filter ON
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp4_common=np.array([[[[0]]]])
 */
        __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 619, __pyx_L1_error)
        __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_t_5), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
            }
            __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
          }
          __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":618
 *             pass
 *         if flag3==0: # filter ON
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:             # <<<<<<<<<<<<<<
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 *             else:
 */
        goto __pyx_L10;
      }

      /* "pyqcstrc/icosah/intsct.pyx":621
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 *             else:
 *                 tmp4_common=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *         else: # filter OFF
 *             tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_5);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_5);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 621, __pyx_L1_error)
        __pyx_t_11 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
            }
            __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
          }
          __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 621, __pyx_L1_error)
        }
        __pyx_t_11 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L10:;

      /* "pyqcstrc/icosah/intsct.pyx":617
 *         else:
 *             pass
 *         if flag3==0: # filter ON             # <<<<<<<<<<<<<<
 *             if rough_check_intersection_two_tetrahedron(cent1,dd1,obj[i2])==0:
 *                 tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/intsct.pyx":623
 *                 tmp4_common=np.array([[[[0]]]])
 *         else: # filter OFF
 *             tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)             # <<<<<<<<<<<<<<
 * 
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 623, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_t_4), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
          }
          __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
        }
        __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 623, __pyx_L1_error)
      }
      __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/intsct.pyx":625
 *             tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 * 
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty             # <<<<<<<<<<<<<<
 *             if verbose>1:
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && 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_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __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(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __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(0, 625, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":626
 * 
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 */
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":627
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *             if verbose>1:
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)             # <<<<<<<<<<<<<<
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 *                 print('        common obj, %d %d %d (%10.8f)'%(v2a,v2b,v2c,vol2))
 */
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4_common), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 627, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 627, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 627, __pyx_L1_error)
        }
        __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_v2a = __pyx_t_12;
        __pyx_v_v2b = __pyx_t_13;
        __pyx_v_v2c = __pyx_t_14;

        /* "pyqcstrc/icosah/intsct.pyx":628
 *             if verbose>1:
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)             # <<<<<<<<<<<<<<
 *                 print('        common obj, %d %d %d (%10.8f)'%(v2a,v2b,v2c,vol2))
 *             else:
 */
        __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4_common), 0);

        /* "pyqcstrc/icosah/intsct.pyx":629
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 *                 print('        common obj, %d %d %d (%10.8f)'%(v2a,v2b,v2c,vol2))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_4 = PyTuple_New(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_18 = 0;
        __pyx_t_16 = 127;
        __Pyx_INCREF(__pyx_kp_u_common_obj);
        __pyx_t_18 += 20;
        __Pyx_GIVEREF(__pyx_kp_u_common_obj);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_common_obj);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2a, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2b, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__5);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2c, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_18 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__6);
        __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_16;
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_kp_u__7);
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 9, __pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __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;

        /* "pyqcstrc/icosah/intsct.pyx":626
 * 
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 */
        goto __pyx_L12;
      }

      /* "pyqcstrc/icosah/intsct.pyx":631
 *                 print('        common obj, %d %d %d (%10.8f)'%(v2a,v2b,v2c,vol2))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 */
      /*else*/ {
      }
      __pyx_L12:;

      /* "pyqcstrc/icosah/intsct.pyx":632
 *             else:
 *                 pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":633
 *                 pass
 *             if counter1==0:
 *                 tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp4_common)
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4_common)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 633, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t((72 * __pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 633, __pyx_L1_error)
        __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
            }
            __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
          }
          __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 633, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":632
 *             else:
 *                 pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/intsct.pyx":635
 *                 tmp1c=tmp4_common.reshape(72*len(tmp4_common)) # 72=4*6*3
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp4_common)             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp4_common)};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp4_common)};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_3) {
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1c));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4_common));
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_19, ((PyObject *)__pyx_v_tmp4_common));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __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 (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 635, __pyx_L1_error)
        __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
            }
            __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
          }
          __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 635, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/intsct.pyx":636
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp4_common)
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":625
 *             tmp4_common=intersection_two_tetrahedron_4(tetrahedron,obj[i2],verbose-1)
 * 
 *         if tmp4_common.tolist()!=[[[[0]]]]: # if common part is not empty             # <<<<<<<<<<<<<<
 *             if verbose>1:
 *                 v2a,v2b,v2c=obj_volume_6d(tmp4_common)
 */
      goto __pyx_L11;
    }

    /* "pyqcstrc/icosah/intsct.pyx":638
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *     if counter1!=0:
 */
    /*else*/ {
    }
    __pyx_L11:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":640
 *             pass
 * 
 *     if counter1!=0:             # <<<<<<<<<<<<<<
 *         tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *         # volume check
 */
  __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":641
 * 
 *     if counter1!=0:
 *         tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         # volume check
 *         v3a,v3b,v3c=obj_volume_6d(tmp4a)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_15) / 72.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && 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;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_20 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_7, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_7, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_7, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_7, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_20, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
        __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
      }
      __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
      if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":643
 *         tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *         # volume check
 *         v3a,v3b,v3c=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *         vol3=(v3a+v3b*TAU)/v3c
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj
 */
    __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(__pyx_t_4 != Py_None)) {
      PyObject* sequence = __pyx_t_4;
      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(0, 643, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_20 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_20);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_20 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 643, __pyx_L1_error)
    }
    __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_v3a = __pyx_t_14;
    __pyx_v_v3b = __pyx_t_13;
    __pyx_v_v3c = __pyx_t_12;

    /* "pyqcstrc/icosah/intsct.pyx":644
 *         # volume check
 *         v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *         vol3=(v3a+v3b*TAU)/v3c             # <<<<<<<<<<<<<<
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj
 *             if verbose>0:
 */
    __pyx_t_21 = (__pyx_v_v3a + (__pyx_v_v3b * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    if (unlikely(__pyx_v_v3c == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 644, __pyx_L1_error)
    }
    __pyx_v_vol3 = (__pyx_t_21 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3c));

    /* "pyqcstrc/icosah/intsct.pyx":645
 *         v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *         vol3=(v3a+v3b*TAU)/v3c
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
    __pyx_t_22 = ((__pyx_v_v3a == __pyx_v_v1a) != 0);
    if (__pyx_t_22) {
    } else {
      __pyx_t_1 = __pyx_t_22;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_22 = ((__pyx_v_v3b == __pyx_v_v1b) != 0);
    if (__pyx_t_22) {
    } else {
      __pyx_t_1 = __pyx_t_22;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_22 = ((__pyx_v_v3c == __pyx_v_v1c) != 0);
    __pyx_t_1 = __pyx_t_22;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":646
 *         vol3=(v3a+v3b*TAU)/v3c
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":647
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj
 *             if verbose>0:
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_4 = PyTuple_New(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = 0;
        __pyx_t_16 = 127;
        __Pyx_INCREF(__pyx_kp_u_common_part_all_1_2);
        __pyx_t_15 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_common_part_all_1_2);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_common_part_all_1_2);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__5);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_15 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__6);
        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_20 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_20);
        __pyx_t_20 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_kp_u__7);
        __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_4, 9, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":646
 *         vol3=(v3a+v3b*TAU)/v3c
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *             else:
 */
        goto __pyx_L19;
      }

      /* "pyqcstrc/icosah/intsct.pyx":649
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             #tmp1b=tetrahedron.reshape(72)
 *             tmp4_common=tetrahedron.reshape(1,4,6,3)
 */
      /*else*/ {
      }
      __pyx_L19:;

      /* "pyqcstrc/icosah/intsct.pyx":651
 *                 pass
 *             #tmp1b=tetrahedron.reshape(72)
 *             tmp4_common=tetrahedron.reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             if vol3<vol1:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tetrahedron), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 651, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_20);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_7 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
          }
          __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
        }
        __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_20));
      __pyx_t_20 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":645
 *         v3a,v3b,v3c=obj_volume_6d(tmp4a)
 *         vol3=(v3a+v3b*TAU)/v3c
 *         if v3a==v1a and v3b==v1b and v3c==v1c: # vol1==vol3  tetrahedronobj             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        common part (all_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
      goto __pyx_L15;
    }

    /* "pyqcstrc/icosah/intsct.pyx":653
 *             tmp4_common=tetrahedron.reshape(1,4,6,3)
 *         else:
 *             if vol3<vol1:             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_vol3 < __pyx_v_vol1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":654
 *         else:
 *             if vol3<vol1:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":655
 *             if vol3<vol1:
 *                 if verbose>0:
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_20 = PyTuple_New(9); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          __pyx_t_15 = 0;
          __pyx_t_16 = 127;
          __Pyx_INCREF(__pyx_kp_u_common_part_partial_1_2);
          __pyx_t_15 += 33;
          __Pyx_GIVEREF(__pyx_kp_u_common_part_partial_1_2);
          PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_kp_u_common_part_partial_1_2);
          __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_4);
          __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_kp_u__5);
          __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_4);
          __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_kp_u__5);
          __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_4);
          __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_kp_u__6);
          __pyx_t_15 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__6);
          PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_kp_u__6);
          __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_INCREF(__pyx_kp_u__7);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__7);
          PyTuple_SET_ITEM(__pyx_t_20, 8, __pyx_kp_u__7);
          __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_20, 9, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 655, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":654
 *         else:
 *             if vol3<vol1:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
          goto __pyx_L21;
        }

        /* "pyqcstrc/icosah/intsct.pyx":657
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 #tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                 tmp4_common=tmp4a
 */
        /*else*/ {
        }
        __pyx_L21:;

        /* "pyqcstrc/icosah/intsct.pyx":659
 *                     pass
 *                 #tmp1b=tmp4a.reshape(len(tmp4a)*72)
 *                 tmp4_common=tmp4a             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose>0:
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_7 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
            }
            __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0;
          }
          __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __Pyx_DECREF_SET(__pyx_v_tmp4_common, __pyx_v_tmp4a);

        /* "pyqcstrc/icosah/intsct.pyx":653
 *             tmp4_common=tetrahedron.reshape(1,4,6,3)
 *         else:
 *             if vol3<vol1:             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('        common part (partial_1), %d %d %d (%10.8f)'%(v3a,v3b,v3c,vol3))
 */
        goto __pyx_L20;
      }

      /* "pyqcstrc/icosah/intsct.pyx":661
 *                 tmp4_common=tmp4a
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('        common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":662
 *             else:
 *                 if verbose>0:
 *                     print('        common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_20 = PyTuple_New(9); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          __pyx_t_15 = 0;
          __pyx_t_16 = 127;
          __Pyx_INCREF(__pyx_kp_u_common_part_2);
          __pyx_t_15 += 21;
          __Pyx_GIVEREF(__pyx_kp_u_common_part_2);
          PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_kp_u_common_part_2);
          __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3a, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_kp_u__5);
          __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3b, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_kp_u__5);
          __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_v3c, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_INCREF(__pyx_kp_u__6);
          __pyx_t_15 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__6);
          PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_kp_u__6);
          __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_t_4);
          __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_kp_u_out_of_expected);
          __pyx_t_15 += 18;
          __Pyx_GIVEREF(__pyx_kp_u_out_of_expected);
          PyTuple_SET_ITEM(__pyx_t_20, 8, __pyx_kp_u_out_of_expected);
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_20, 9, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":661
 *                 tmp4_common=tmp4a
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('        common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                 else:
 */
          goto __pyx_L22;
        }

        /* "pyqcstrc/icosah/intsct.pyx":664
 *                     print('        common part, %d %d %d (%10.8f) out of expected!'%(v3a,v3b,v3c,vol3))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 #tmp1b=np.array([0])
 *                 tmp4_common=np.array([[[[0]]]])
 */
        /*else*/ {
        }
        __pyx_L22:;

        /* "pyqcstrc/icosah/intsct.pyx":666
 *                     pass
 *                 #tmp1b=np.array([0])
 *                 tmp4_common=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *         if tmp4_common.tolist()!=[[[[0]]]]:
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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_20 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 666, __pyx_L1_error)
        __pyx_t_11 = ((PyArrayObject *)__pyx_t_20);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_7 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
            }
            __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0;
          }
          __pyx_pybuffernd_tmp4_common.diminfo[0].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4_common.diminfo[0].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4_common.diminfo[1].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4_common.diminfo[1].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4_common.diminfo[2].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4_common.diminfo[2].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4_common.diminfo[3].strides = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4_common.diminfo[3].shape = __pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
        }
        __pyx_t_11 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp4_common, ((PyArrayObject *)__pyx_t_20));
        __pyx_t_20 = 0;
      }
      __pyx_L20:;
    }
    __pyx_L15:;

    /* "pyqcstrc/icosah/intsct.pyx":667
 *                 #tmp1b=np.array([0])
 *                 tmp4_common=np.array([[[[0]]]])
 *         if tmp4_common.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4_common), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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_20 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_20, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __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(0, 667, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":669
 *         if tmp4_common.tolist()!=[[[[0]]]]:
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":670
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 *                 v1a,v1b,v1c=obj_volume_6d(tmp4_common)             # <<<<<<<<<<<<<<
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 *                 print('        common part, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 */
        __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4_common), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (likely(__pyx_t_2 != Py_None)) {
          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(0, 670, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_20 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_20);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_20 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 670, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 670, __pyx_L1_error)
        }
        __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_v1a = __pyx_t_12;
        __pyx_v_v1b = __pyx_t_13;
        __pyx_v_v1c = __pyx_t_14;

        /* "pyqcstrc/icosah/intsct.pyx":671
 *             if verbose>0:
 *                 v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)             # <<<<<<<<<<<<<<
 *                 print('        common part, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *             else:
 */
        __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4_common), 0);

        /* "pyqcstrc/icosah/intsct.pyx":672
 *                 v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 *                 print('        common part, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = 0;
        __pyx_t_16 = 127;
        __Pyx_INCREF(__pyx_kp_u_common_part_volume);
        __pyx_t_15 += 30;
        __Pyx_GIVEREF(__pyx_kp_u_common_part_volume);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_common_part_volume);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1a, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1b, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v1c, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_15 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6);
        __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_20);
        __pyx_t_20 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__7);
        __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":669
 *         if tmp4_common.tolist()!=[[[[0]]]]:
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v1a,v1b,v1c=obj_volume_6d(tmp4_common)
 *                 vol2=obj_volume_6d_numerical(tmp4_common)
 */
        goto __pyx_L24;
      }

      /* "pyqcstrc/icosah/intsct.pyx":674
 *                 print('        common part, volume = %d %d %d (%10.8f)'%(v1a,v1b,v1c,vol2))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp4_common
 *         else:
 */
      /*else*/ {
      }
      __pyx_L24:;

      /* "pyqcstrc/icosah/intsct.pyx":675
 *             else:
 *                 pass
 *             return tmp4_common             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4_common));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4_common);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/intsct.pyx":667
 *                 #tmp1b=np.array([0])
 *                 tmp4_common=np.array([[[[0]]]])
 *         if tmp4_common.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             #tmp4_common=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":677
 *             return tmp4_common
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        common part, empty')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":678
 *         else:
 *             if verbose>0:
 *                 print('        common part, empty')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":677
 *             return tmp4_common
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        common part, empty')
 *             else:
 */
        goto __pyx_L25;
      }

      /* "pyqcstrc/icosah/intsct.pyx":680
 *                 print('        common part, empty')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return np.array([[[[0]]]])
 * 
 */
      /*else*/ {
      }
      __pyx_L25:;

      /* "pyqcstrc/icosah/intsct.pyx":681
 *             else:
 *                 pass
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 *     else: # if common part (obj1_reduced and obj2) is NOT empty
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_20, 0, __pyx_int_0);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_20);
      __pyx_t_20 = 0;
      __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_20, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_20);
      __pyx_t_20 = 0;
      __pyx_t_20 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_20)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_20);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_2 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_20, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 681, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/intsct.pyx":640
 *             pass
 * 
 *     if counter1!=0:             # <<<<<<<<<<<<<<
 *         tmp4a=tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *         # volume check
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":684
 * 
 *     else: # if common part (obj1_reduced and obj2) is NOT empty
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        common part, empty')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":685
 *     else: # if common part (obj1_reduced and obj2) is NOT empty
 *         if verbose>0:
 *             print('        common part, empty')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":684
 * 
 *     else: # if common part (obj1_reduced and obj2) is NOT empty
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        common part, empty')
 *         else:
 */
      goto __pyx_L26;
    }

    /* "pyqcstrc/icosah/intsct.pyx":687
 *             print('        common part, empty')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 * 
 */
    /*else*/ {
    }
    __pyx_L26:;

    /* "pyqcstrc/icosah/intsct.pyx":688
 *         else:
 *             pass
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
    __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_20, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_20);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_20);
    __pyx_t_20 = 0;
    __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_20, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_20) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_20);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 688, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":572
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_tetrahedron_obj_4(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=4] obj,
 *                                                 int flag3,
 */

  /* 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_20);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_tetrahedron_obj_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cent1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4_common.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1c);
  __Pyx_XDECREF((PyObject *)__pyx_v_cent1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4_common);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_7intersection_tetrahedron_obj_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_7intersection_tetrahedron_obj_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_tetrahedron = 0;
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_flag3;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection_tetrahedron_obj_4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tetrahedron_2,&__pyx_n_s_obj,&__pyx_n_s_flag3,&__pyx_n_s_verbose,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tetrahedron_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_tetrahedron_obj_4", 1, 4, 4, 1); __PYX_ERR(0, 572, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_tetrahedron_obj_4", 1, 4, 4, 2); __PYX_ERR(0, 572, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_tetrahedron_obj_4", 1, 4, 4, 3); __PYX_ERR(0, 572, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection_tetrahedron_obj_4") < 0)) __PYX_ERR(0, 572, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_tetrahedron = ((PyArrayObject *)values[0]);
    __pyx_v_obj = ((PyArrayObject *)values[1]);
    __pyx_v_flag3 = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_flag3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 574, __pyx_L3_error)
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection_tetrahedron_obj_4", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 572, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_tetrahedron_obj_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tetrahedron), __pyx_ptype_5numpy_ndarray, 1, "tetrahedron", 0))) __PYX_ERR(0, 572, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_5numpy_ndarray, 1, "obj", 0))) __PYX_ERR(0, 573, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_6intersection_tetrahedron_obj_4(__pyx_self, __pyx_v_tetrahedron, __pyx_v_obj, __pyx_v_flag3, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_6intersection_tetrahedron_obj_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj, int __pyx_v_flag3, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  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("intersection_tetrahedron_obj_4", 0);
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 572, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 572, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_obj), __pyx_v_flag3, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_tetrahedron_obj_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":693
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_two_tetrahedron_4(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2,
 *                                                 int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_9intersection_two_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_counter1;
  int __pyx_v_num1;
  long __pyx_v_a1;
  long __pyx_v_b1;
  long __pyx_v_c1;
  float __pyx_v_vol1;
  PyArrayObject *__pyx_v_tmp1a = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_comb = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyObject *__pyx_v_segment_1 = NULL;
  PyObject *__pyx_v_segment_2 = NULL;
  PyObject *__pyx_v_surface_1 = NULL;
  PyObject *__pyx_v_surface_2 = NULL;
  PyObject *__pyx_v_surface_3 = NULL;
  int __pyx_v_flag;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_comb;
  __Pyx_Buffer __pyx_pybuffer_comb;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron_1;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron_2;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1c;
  __Pyx_Buffer __pyx_pybuffer_tmp1c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyArrayObject *__pyx_t_29 = NULL;
  int __pyx_t_30;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  PyArrayObject *__pyx_t_34 = NULL;
  int __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  PyArrayObject *__pyx_t_37 = NULL;
  PyArrayObject *__pyx_t_38 = NULL;
  long __pyx_t_39;
  long __pyx_t_40;
  long __pyx_t_41;
  __pyx_t_5numpy_float64_t __pyx_t_42;
  Py_UCS4 __pyx_t_43;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_two_tetrahedron_4", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp1b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1b.refcount = 0;
  __pyx_pybuffernd_tmp1b.data = NULL;
  __pyx_pybuffernd_tmp1b.rcbuffer = &__pyx_pybuffer_tmp1b;
  __pyx_pybuffer_tmp1c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1c.refcount = 0;
  __pyx_pybuffernd_tmp1c.data = NULL;
  __pyx_pybuffernd_tmp1c.rcbuffer = &__pyx_pybuffer_tmp1c;
  __pyx_pybuffer_comb.pybuffer.buf = NULL;
  __pyx_pybuffer_comb.refcount = 0;
  __pyx_pybuffernd_comb.data = NULL;
  __pyx_pybuffernd_comb.rcbuffer = &__pyx_pybuffer_comb;
  __pyx_pybuffer_tmp3a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3a.refcount = 0;
  __pyx_pybuffernd_tmp3a.data = NULL;
  __pyx_pybuffernd_tmp3a.rcbuffer = &__pyx_pybuffer_tmp3a;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tetrahedron_1.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_1.refcount = 0;
  __pyx_pybuffernd_tetrahedron_1.data = NULL;
  __pyx_pybuffernd_tetrahedron_1.rcbuffer = &__pyx_pybuffer_tetrahedron_1;
  __pyx_pybuffer_tetrahedron_2.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_2.refcount = 0;
  __pyx_pybuffernd_tetrahedron_2.data = NULL;
  __pyx_pybuffernd_tetrahedron_2.rcbuffer = &__pyx_pybuffer_tetrahedron_2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 693, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_1.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_1.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_1.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_1.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_1.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_1.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 693, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_2.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_2.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_2.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_2.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_2.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_2.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/intsct.pyx":705
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        intersection_two_tetrahedron_4()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":706
 * 
 *     if verbose>0:
 *         print('        intersection_two_tetrahedron_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":705
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        intersection_two_tetrahedron_4()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":708
 *         print('        intersection_two_tetrahedron_4()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #
 *     # -----------------
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":759
 *     # combination_index
 *     # e.g. v1,v2,w1,w2,w3 (edge 1 and surface 1) ...
 *     comb=np.array([\             # <<<<<<<<<<<<<<
 *     [0,1,0,1,2],\
 *     [0,1,0,1,3],\
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":760
 *     # e.g. v1,v2,w1,w2,w3 (edge 1 and surface 1) ...
 *     comb=np.array([\
 *     [0,1,0,1,2],\             # <<<<<<<<<<<<<<
 *     [0,1,0,1,3],\
 *     [0,1,0,2,3],\
 */
  __pyx_t_3 = PyList_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":761
 *     comb=np.array([\
 *     [0,1,0,1,2],\
 *     [0,1,0,1,3],\             # <<<<<<<<<<<<<<
 *     [0,1,0,2,3],\
 *     [0,1,1,2,3],\
 */
  __pyx_t_5 = PyList_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":762
 *     [0,1,0,1,2],\
 *     [0,1,0,1,3],\
 *     [0,1,0,2,3],\             # <<<<<<<<<<<<<<
 *     [0,1,1,2,3],\
 *     [0,2,0,1,2],\
 */
  __pyx_t_6 = PyList_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":763
 *     [0,1,0,1,3],\
 *     [0,1,0,2,3],\
 *     [0,1,1,2,3],\             # <<<<<<<<<<<<<<
 *     [0,2,0,1,2],\
 *     [0,2,0,1,3],\
 */
  __pyx_t_7 = PyList_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":764
 *     [0,1,0,2,3],\
 *     [0,1,1,2,3],\
 *     [0,2,0,1,2],\             # <<<<<<<<<<<<<<
 *     [0,2,0,1,3],\
 *     [0,2,0,2,3],\
 */
  __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_8, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":765
 *     [0,1,1,2,3],\
 *     [0,2,0,1,2],\
 *     [0,2,0,1,3],\             # <<<<<<<<<<<<<<
 *     [0,2,0,2,3],\
 *     [0,2,1,2,3],\
 */
  __pyx_t_9 = PyList_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_9, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_9, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_9, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_9, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":766
 *     [0,2,0,1,2],\
 *     [0,2,0,1,3],\
 *     [0,2,0,2,3],\             # <<<<<<<<<<<<<<
 *     [0,2,1,2,3],\
 *     [0,3,0,1,2],\
 */
  __pyx_t_10 = PyList_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_10, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_10, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_10, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_10, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_10, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":767
 *     [0,2,0,1,3],\
 *     [0,2,0,2,3],\
 *     [0,2,1,2,3],\             # <<<<<<<<<<<<<<
 *     [0,3,0,1,2],\
 *     [0,3,0,1,3],\
 */
  __pyx_t_11 = PyList_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_11, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_11, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":768
 *     [0,2,0,2,3],\
 *     [0,2,1,2,3],\
 *     [0,3,0,1,2],\             # <<<<<<<<<<<<<<
 *     [0,3,0,1,3],\
 *     [0,3,0,2,3],\
 */
  __pyx_t_12 = PyList_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_12, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_12, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_12, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":769
 *     [0,2,1,2,3],\
 *     [0,3,0,1,2],\
 *     [0,3,0,1,3],\             # <<<<<<<<<<<<<<
 *     [0,3,0,2,3],\
 *     [0,3,1,2,3],\
 */
  __pyx_t_13 = PyList_New(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_13, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_13, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_13, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_13, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":770
 *     [0,3,0,1,2],\
 *     [0,3,0,1,3],\
 *     [0,3,0,2,3],\             # <<<<<<<<<<<<<<
 *     [0,3,1,2,3],\
 *     [1,2,0,1,2],\
 */
  __pyx_t_14 = PyList_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_14, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_14, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_14, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_14, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_14, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":771
 *     [0,3,0,1,3],\
 *     [0,3,0,2,3],\
 *     [0,3,1,2,3],\             # <<<<<<<<<<<<<<
 *     [1,2,0,1,2],\
 *     [1,2,0,1,3],\
 */
  __pyx_t_15 = PyList_New(5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_15, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_15, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_15, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_15, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_15, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":772
 *     [0,3,0,2,3],\
 *     [0,3,1,2,3],\
 *     [1,2,0,1,2],\             # <<<<<<<<<<<<<<
 *     [1,2,0,1,3],\
 *     [1,2,0,2,3],\
 */
  __pyx_t_16 = PyList_New(5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_16, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_16, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_16, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_16, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":773
 *     [0,3,1,2,3],\
 *     [1,2,0,1,2],\
 *     [1,2,0,1,3],\             # <<<<<<<<<<<<<<
 *     [1,2,0,2,3],\
 *     [1,2,1,2,3],\
 */
  __pyx_t_17 = PyList_New(5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_17, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_17, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_17, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_17, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_17, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":774
 *     [1,2,0,1,2],\
 *     [1,2,0,1,3],\
 *     [1,2,0,2,3],\             # <<<<<<<<<<<<<<
 *     [1,2,1,2,3],\
 *     [1,3,0,1,2],\
 */
  __pyx_t_18 = PyList_New(5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_18, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_18, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_18, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_18, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_18, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":775
 *     [1,2,0,1,3],\
 *     [1,2,0,2,3],\
 *     [1,2,1,2,3],\             # <<<<<<<<<<<<<<
 *     [1,3,0,1,2],\
 *     [1,3,0,1,3],\
 */
  __pyx_t_19 = PyList_New(5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_19, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_19, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_19, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_19, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_19, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":776
 *     [1,2,0,2,3],\
 *     [1,2,1,2,3],\
 *     [1,3,0,1,2],\             # <<<<<<<<<<<<<<
 *     [1,3,0,1,3],\
 *     [1,3,0,2,3],\
 */
  __pyx_t_20 = PyList_New(5); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_20, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_20, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_20, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_20, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_20, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":777
 *     [1,2,1,2,3],\
 *     [1,3,0,1,2],\
 *     [1,3,0,1,3],\             # <<<<<<<<<<<<<<
 *     [1,3,0,2,3],\
 *     [1,3,1,2,3],\
 */
  __pyx_t_21 = PyList_New(5); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_21, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_21, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_21, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_21, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_21, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":778
 *     [1,3,0,1,2],\
 *     [1,3,0,1,3],\
 *     [1,3,0,2,3],\             # <<<<<<<<<<<<<<
 *     [1,3,1,2,3],\
 *     [2,3,0,1,2],\
 */
  __pyx_t_22 = PyList_New(5); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_22, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_22, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_22, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_22, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_22, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":779
 *     [1,3,0,1,3],\
 *     [1,3,0,2,3],\
 *     [1,3,1,2,3],\             # <<<<<<<<<<<<<<
 *     [2,3,0,1,2],\
 *     [2,3,0,1,3],\
 */
  __pyx_t_23 = PyList_New(5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_23, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_23, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_23, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_23, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_23, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":780
 *     [1,3,0,2,3],\
 *     [1,3,1,2,3],\
 *     [2,3,0,1,2],\             # <<<<<<<<<<<<<<
 *     [2,3,0,1,3],\
 *     [2,3,0,2,3],\
 */
  __pyx_t_24 = PyList_New(5); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_24, 0, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_24, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_24, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_24, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_24, 4, __pyx_int_2);

  /* "pyqcstrc/icosah/intsct.pyx":781
 *     [1,3,1,2,3],\
 *     [2,3,0,1,2],\
 *     [2,3,0,1,3],\             # <<<<<<<<<<<<<<
 *     [2,3,0,2,3],\
 *     [2,3,1,2,3]])
 */
  __pyx_t_25 = PyList_New(5); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_25, 3, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_25, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":782
 *     [2,3,0,1,2],\
 *     [2,3,0,1,3],\
 *     [2,3,0,2,3],\             # <<<<<<<<<<<<<<
 *     [2,3,1,2,3]])
 * 
 */
  __pyx_t_26 = PyList_New(5); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_26, 0, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_26, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_26, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_26, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_26, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":783
 *     [2,3,0,1,3],\
 *     [2,3,0,2,3],\
 *     [2,3,1,2,3]])             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  __pyx_t_27 = PyList_New(5); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_27, 3, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_27, 4, __pyx_int_3);

  /* "pyqcstrc/icosah/intsct.pyx":759
 *     # combination_index
 *     # e.g. v1,v2,w1,w2,w3 (edge 1 and surface 1) ...
 *     comb=np.array([\             # <<<<<<<<<<<<<<
 *     [0,1,0,1,2],\
 *     [0,1,0,1,3],\
 */
  __pyx_t_28 = PyList_New(24); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_28, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_28, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_28, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_28, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_28, 4, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyList_SET_ITEM(__pyx_t_28, 5, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyList_SET_ITEM(__pyx_t_28, 6, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyList_SET_ITEM(__pyx_t_28, 7, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyList_SET_ITEM(__pyx_t_28, 8, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_28, 9, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_14);
  PyList_SET_ITEM(__pyx_t_28, 10, __pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_15);
  PyList_SET_ITEM(__pyx_t_28, 11, __pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_16);
  PyList_SET_ITEM(__pyx_t_28, 12, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_17);
  PyList_SET_ITEM(__pyx_t_28, 13, __pyx_t_17);
  __Pyx_GIVEREF(__pyx_t_18);
  PyList_SET_ITEM(__pyx_t_28, 14, __pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_28, 15, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_20);
  PyList_SET_ITEM(__pyx_t_28, 16, __pyx_t_20);
  __Pyx_GIVEREF(__pyx_t_21);
  PyList_SET_ITEM(__pyx_t_28, 17, __pyx_t_21);
  __Pyx_GIVEREF(__pyx_t_22);
  PyList_SET_ITEM(__pyx_t_28, 18, __pyx_t_22);
  __Pyx_GIVEREF(__pyx_t_23);
  PyList_SET_ITEM(__pyx_t_28, 19, __pyx_t_23);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_28, 20, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_28, 21, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_28, 22, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_28, 23, __pyx_t_27);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __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_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __pyx_t_15 = 0;
  __pyx_t_16 = 0;
  __pyx_t_17 = 0;
  __pyx_t_18 = 0;
  __pyx_t_19 = 0;
  __pyx_t_20 = 0;
  __pyx_t_21 = 0;
  __pyx_t_22 = 0;
  __pyx_t_23 = 0;
  __pyx_t_24 = 0;
  __pyx_t_25 = 0;
  __pyx_t_26 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_27, __pyx_t_28) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_28);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 759, __pyx_L1_error)
  __pyx_t_29 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_comb.rcbuffer->pybuffer);
    __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_comb.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_30 < 0)) {
      PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_comb.rcbuffer->pybuffer, (PyObject*)__pyx_v_comb, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
      }
      __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
    }
    __pyx_pybuffernd_comb.diminfo[0].strides = __pyx_pybuffernd_comb.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_comb.diminfo[0].shape = __pyx_pybuffernd_comb.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_comb.diminfo[1].strides = __pyx_pybuffernd_comb.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_comb.diminfo[1].shape = __pyx_pybuffernd_comb.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 759, __pyx_L1_error)
  }
  __pyx_t_29 = 0;
  __pyx_v_comb = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":785
 *     [2,3,1,2,3]])
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_28))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_28);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_28, function);
    }
  }
  __pyx_t_2 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_27, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_30 < 0)) {
      PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
      }
      __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 785, __pyx_L1_error)
  }
  __pyx_t_34 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":786
 * 
 *     tmp1a=np.array([0])
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1c=np.array([0])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_28, __pyx_n_s_np); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_28 = PyList_New(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_28, 0, __pyx_int_0);
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_27, __pyx_t_28) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_28);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 786, __pyx_L1_error)
  __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_30 < 0)) {
      PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
      }
      __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
    }
    __pyx_pybuffernd_tmp1b.diminfo[0].strides = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1b.diminfo[0].shape = __pyx_pybuffernd_tmp1b.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 786, __pyx_L1_error)
  }
  __pyx_t_34 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":787
 *     tmp1a=np.array([0])
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 * 
 *     counter1=0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_28))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_28);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_28, function);
    }
  }
  __pyx_t_2 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_27, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 787, __pyx_L1_error)
  __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_30 < 0)) {
      PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
      }
      __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
    }
    __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 787, __pyx_L1_error)
  }
  __pyx_t_34 = 0;
  __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":789
 *     tmp1c=np.array([0])
 * 
 *     counter1=0             # <<<<<<<<<<<<<<
 *     #for i1 in range(len(comb)): # len(combination_index) = 24
 *     for i1 in range(24):
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":791
 *     counter1=0
 *     #for i1 in range(len(comb)): # len(combination_index) = 24
 *     for i1 in range(24):             # <<<<<<<<<<<<<<
 *         # case 1: intersection between
 *         # 6 edges of tetrahedron_1
 */
  for (__pyx_t_30 = 0; __pyx_t_30 < 24; __pyx_t_30+=1) {
    __pyx_v_i1 = __pyx_t_30;

    /* "pyqcstrc/icosah/intsct.pyx":795
 *         # 6 edges of tetrahedron_1
 *         # 4 surfaces of tetrahedron_2
 *         segment_1=tetrahedron_1[comb[i1][0]]             # <<<<<<<<<<<<<<
 *         segment_2=tetrahedron_1[comb[i1][1]]
 *         surface_1=tetrahedron_2[comb[i1][2]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF_SET(__pyx_v_segment_1, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":796
 *         # 4 surfaces of tetrahedron_2
 *         segment_1=tetrahedron_1[comb[i1][0]]
 *         segment_2=tetrahedron_1[comb[i1][1]]             # <<<<<<<<<<<<<<
 *         surface_1=tetrahedron_2[comb[i1][2]]
 *         surface_2=tetrahedron_2[comb[i1][3]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF_SET(__pyx_v_segment_2, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":797
 *         segment_1=tetrahedron_1[comb[i1][0]]
 *         segment_2=tetrahedron_1[comb[i1][1]]
 *         surface_1=tetrahedron_2[comb[i1][2]]             # <<<<<<<<<<<<<<
 *         surface_2=tetrahedron_2[comb[i1][3]]
 *         surface_3=tetrahedron_2[comb[i1][4]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF_SET(__pyx_v_surface_1, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":798
 *         segment_2=tetrahedron_1[comb[i1][1]]
 *         surface_1=tetrahedron_2[comb[i1][2]]
 *         surface_2=tetrahedron_2[comb[i1][3]]             # <<<<<<<<<<<<<<
 *         surface_3=tetrahedron_2[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF_SET(__pyx_v_surface_2, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":799
 *         surface_1=tetrahedron_2[comb[i1][2]]
 *         surface_2=tetrahedron_2[comb[i1][3]]
 *         surface_3=tetrahedron_2[comb[i1][4]]             # <<<<<<<<<<<<<<
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_XDECREF_SET(__pyx_v_surface_3, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":800
 *         surface_2=tetrahedron_2[comb[i1][3]]
 *         surface_3=tetrahedron_2[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)             # <<<<<<<<<<<<<<
 *         if len(tmp1c)!=1:
 *             if counter1==0 :
 */
    if (!(likely(((__pyx_v_segment_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 800, __pyx_L1_error)
    if (!(likely(((__pyx_v_segment_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 800, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 800, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 800, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 800, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_segment_surface(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_1), ((PyArrayObject *)__pyx_v_surface_2), ((PyArrayObject *)__pyx_v_surface_3), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
      __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_35 < 0)) {
        PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
        }
        __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
      }
      __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":801
 *         surface_3=tetrahedron_2[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *             if counter1==0 :
 *                 tmp1a=tmp1c # intersection
 */
    __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 801, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_36 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":802
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 *             if counter1==0 :             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp1c # intersection
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":803
 *         if len(tmp1c)!=1:
 *             if counter1==0 :
 *                 tmp1a=tmp1c # intersection             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
            }
            __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 803, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
        __Pyx_DECREF_SET(__pyx_v_tmp1a, __pyx_v_tmp1c);

        /* "pyqcstrc/icosah/intsct.pyx":802
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 *             if counter1==0 :             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp1c # intersection
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/intsct.pyx":805
 *                 tmp1a=tmp1c # intersection
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_28, __pyx_n_s_np); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 805, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __pyx_t_28 = NULL;
        __pyx_t_35 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_28)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_28);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_35 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_28, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1c)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_28, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1c)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_27 = PyTuple_New(2+__pyx_t_35); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 805, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          if (__pyx_t_28) {
            __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_28); __pyx_t_28 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_27, 0+__pyx_t_35, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
          PyTuple_SET_ITEM(__pyx_t_27, 1+__pyx_t_35, ((PyObject *)__pyx_v_tmp1c));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 805, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
            }
            __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 805, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
      }
      __pyx_L7:;

      /* "pyqcstrc/icosah/intsct.pyx":806
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":801
 *         surface_3=tetrahedron_2[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *             if counter1==0 :
 *                 tmp1a=tmp1c # intersection
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/intsct.pyx":808
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         # case 2: intersection between
 *         # 6 edges of tetrahedron_2
 */
    /*else*/ {
    }
    __pyx_L6:;

    /* "pyqcstrc/icosah/intsct.pyx":812
 *         # 6 edges of tetrahedron_2
 *         # 4 surfaces of tetrahedron_1
 *         segment_1=tetrahedron_2[comb[i1][0]]             # <<<<<<<<<<<<<<
 *         segment_2=tetrahedron_2[comb[i1][1]]
 *         surface_1=tetrahedron_1[comb[i1][2]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_segment_1, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":813
 *         # 4 surfaces of tetrahedron_1
 *         segment_1=tetrahedron_2[comb[i1][0]]
 *         segment_2=tetrahedron_2[comb[i1][1]]             # <<<<<<<<<<<<<<
 *         surface_1=tetrahedron_1[comb[i1][2]]
 *         surface_2=tetrahedron_1[comb[i1][3]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_segment_2, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":814
 *         segment_1=tetrahedron_2[comb[i1][0]]
 *         segment_2=tetrahedron_2[comb[i1][1]]
 *         surface_1=tetrahedron_1[comb[i1][2]]             # <<<<<<<<<<<<<<
 *         surface_2=tetrahedron_1[comb[i1][3]]
 *         surface_3=tetrahedron_1[comb[i1][4]]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_surface_1, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":815
 *         segment_2=tetrahedron_2[comb[i1][1]]
 *         surface_1=tetrahedron_1[comb[i1][2]]
 *         surface_2=tetrahedron_1[comb[i1][3]]             # <<<<<<<<<<<<<<
 *         surface_3=tetrahedron_1[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_surface_2, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":816
 *         surface_1=tetrahedron_1[comb[i1][2]]
 *         surface_2=tetrahedron_1[comb[i1][3]]
 *         surface_3=tetrahedron_1[comb[i1][4]]             # <<<<<<<<<<<<<<
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_comb), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_surface_3, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":817
 *         surface_2=tetrahedron_1[comb[i1][3]]
 *         surface_3=tetrahedron_1[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)             # <<<<<<<<<<<<<<
 *         if len(tmp1c)!=1:
 *             if counter1==0:
 */
    if (!(likely(((__pyx_v_segment_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 817, __pyx_L1_error)
    if (!(likely(((__pyx_v_segment_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_segment_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 817, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 817, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 817, __pyx_L1_error)
    if (!(likely(((__pyx_v_surface_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_surface_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 817, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_segment_surface(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_1), ((PyArrayObject *)__pyx_v_surface_2), ((PyArrayObject *)__pyx_v_surface_3), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
      __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_35 < 0)) {
        PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
        }
        __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
      }
      __pyx_pybuffernd_tmp1c.diminfo[0].strides = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1c.diminfo[0].shape = __pyx_pybuffernd_tmp1c.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 817, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":818
 *         surface_3=tetrahedron_1[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tmp1c # intersection
 */
    __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 818, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_36 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":819
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp1c # intersection
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":820
 *         if len(tmp1c)!=1:
 *             if counter1==0:
 *                 tmp1a=tmp1c # intersection             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
            }
            __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
        __Pyx_DECREF_SET(__pyx_v_tmp1a, __pyx_v_tmp1c);

        /* "pyqcstrc/icosah/intsct.pyx":819
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp1c # intersection
 *             else:
 */
        goto __pyx_L9;
      }

      /* "pyqcstrc/icosah/intsct.pyx":822
 *                 tmp1a=tmp1c # intersection
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        __pyx_t_35 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_27);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_27, function);
            __pyx_t_35 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_27)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1c)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_27)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1c)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_28 = PyTuple_New(2+__pyx_t_35); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_28);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_28, 0+__pyx_t_35, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
          PyTuple_SET_ITEM(__pyx_t_28, 1+__pyx_t_35, ((PyObject *)__pyx_v_tmp1c));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_t_28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        }
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 822, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
            }
            __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 822, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
      }
      __pyx_L9:;

      /* "pyqcstrc/icosah/intsct.pyx":823
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp1c) # intersecting points
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":818
 *         surface_3=tetrahedron_1[comb[i1][4]]
 *         tmp1c=intersection_segment_surface(segment_1,segment_2,surface_1,surface_2,surface_3,verbose-1)
 *         if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tmp1c # intersection
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":825
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *     # get vertces of tetrahedron_1 which are inside tetrahedron_2
 */
    /*else*/ {
    }
    __pyx_L8:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":829
 *     # get vertces of tetrahedron_1 which are inside tetrahedron_2
 *     #for i1 in range(len(tetrahedron_1)):
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])
 *         if flag==0:
 */
  for (__pyx_t_30 = 0; __pyx_t_30 < 4; __pyx_t_30+=1) {
    __pyx_v_i1 = __pyx_t_30;

    /* "pyqcstrc/icosah/intsct.pyx":830
 *     #for i1 in range(len(tetrahedron_1)):
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])             # <<<<<<<<<<<<<<
 *         if flag==0:
 *             if counter1==0:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_t_28 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    if (!(likely(((__pyx_t_28) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_28, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_27), ((PyArrayObject *)__pyx_t_28), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_26), 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":831
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])
 *         if flag==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tetrahedron_1[i1].reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":832
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])
 *         if flag==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tetrahedron_1[i1].reshape(18)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":833
 *         if flag==0:
 *             if counter1==0:
 *                 tmp1a=tetrahedron_1[i1].reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_1[i1])
 */
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_28))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_28);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_28, function);
          }
        }
        __pyx_t_26 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 833, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_26);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
            }
            __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_26));
        __pyx_t_26 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":832
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])
 *         if flag==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tetrahedron_1[i1].reshape(18)
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/intsct.pyx":835
 *                 tmp1a=tetrahedron_1[i1].reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_1[i1])             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_28, __pyx_n_s_np); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __pyx_t_28 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_27 = NULL;
        __pyx_t_35 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_27)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_35 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_27, ((PyObject *)__pyx_v_tmp1a), __pyx_t_28};
          __pyx_t_26 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_27, ((PyObject *)__pyx_v_tmp1a), __pyx_t_28};
          __pyx_t_26 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_27) {
            __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_27); __pyx_t_27 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_35, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_28);
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_35, __pyx_t_28);
          __pyx_t_28 = 0;
          __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 835, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_26);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
            }
            __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 835, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_26));
        __pyx_t_26 = 0;
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/intsct.pyx":836
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_1[i1])
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":831
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_1[i1],tetrahedron_2[0],tetrahedron_2[1],tetrahedron_2[2],tetrahedron_2[3])
 *         if flag==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tetrahedron_1[i1].reshape(18)
 */
      goto __pyx_L12;
    }

    /* "pyqcstrc/icosah/intsct.pyx":838
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     # get vertces of tetrahedron_2 which are inside tetrahedron_1
 *     #for i1 in range(len(tetrahedron_2)):
 */
    /*else*/ {
    }
    __pyx_L12:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":841
 *     # get vertces of tetrahedron_2 which are inside tetrahedron_1
 *     #for i1 in range(len(tetrahedron_2)):
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])
 *         if flag==0:
 */
  for (__pyx_t_30 = 0; __pyx_t_30 < 4; __pyx_t_30+=1) {
    __pyx_v_i1 = __pyx_t_30;

    /* "pyqcstrc/icosah/intsct.pyx":842
 *     #for i1 in range(len(tetrahedron_2)):
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])             # <<<<<<<<<<<<<<
 *         if flag==0:
 *             if counter1==0:
 */
    __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 842, __pyx_L1_error)
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 842, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 842, __pyx_L1_error)
    __pyx_t_28 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    if (!(likely(((__pyx_t_28) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_28, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 842, __pyx_L1_error)
    __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 842, __pyx_L1_error)
    __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_26), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_28), ((PyArrayObject *)__pyx_t_27), 0);
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":843
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])
 *         if flag==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tetrahedron_2[i1].reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":844
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])
 *         if flag==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tetrahedron_2[i1].reshape(18)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":845
 *         if flag==0:
 *             if counter1==0:
 *                 tmp1a=tetrahedron_2[i1].reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_2[i1])
 */
        __pyx_t_28 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __pyx_t_28 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_28)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_28);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_27 = (__pyx_t_28) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_28, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
        if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 845, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_27);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
            }
            __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 845, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_27));
        __pyx_t_27 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":844
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])
 *         if flag==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tetrahedron_2[i1].reshape(18)
 *             else:
 */
        goto __pyx_L17;
      }

      /* "pyqcstrc/icosah/intsct.pyx":847
 *                 tmp1a=tetrahedron_2[i1].reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_2[i1])             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron_2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = NULL;
        __pyx_t_35 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_28))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_28);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_28, function);
            __pyx_t_35 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_28)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_27 = __Pyx_PyFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_28)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_27 = __Pyx_PyCFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_35, 2+__pyx_t_35); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_26 = PyTuple_New(2+__pyx_t_35); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_35, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_35, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_27 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_26, NULL); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        }
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 847, __pyx_L1_error)
        __pyx_t_34 = ((PyArrayObject *)__pyx_t_27);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_35 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_35 < 0)) {
            PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
            }
            __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_35 < 0)) __PYX_ERR(0, 847, __pyx_L1_error)
        }
        __pyx_t_34 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_27));
        __pyx_t_27 = 0;
      }
      __pyx_L17:;

      /* "pyqcstrc/icosah/intsct.pyx":848
 *             else:
 *                 tmp1a=np.append(tmp1a,tetrahedron_2[i1])
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":843
 *     for i1 in range(4):
 *         flag=inside_outside_tetrahedron(tetrahedron_2[i1],tetrahedron_1[0],tetrahedron_1[1],tetrahedron_1[2],tetrahedron_1[3])
 *         if flag==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tetrahedron_2[i1].reshape(18)
 */
      goto __pyx_L16;
    }

    /* "pyqcstrc/icosah/intsct.pyx":850
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *     tmp4a=np.array([[[[0]]]])
 */
    /*else*/ {
    }
    __pyx_L16:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":852
 *             pass
 * 
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     if counter1>=4:
 *         # remove doubling
 */
  __Pyx_GetModuleGlobalName(__pyx_t_28, __pyx_n_s_np); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_array); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_28 = PyList_New(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_28, 0, __pyx_int_0);
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_28);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_28);
  __pyx_t_28 = 0;
  __pyx_t_28 = PyList_New(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_28, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_28);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_28);
  __pyx_t_28 = 0;
  __pyx_t_28 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) {
    __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_26);
    if (likely(__pyx_t_28)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
      __Pyx_INCREF(__pyx_t_28);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_26, function);
    }
  }
  __pyx_t_27 = (__pyx_t_28) ? __Pyx_PyObject_Call2Args(__pyx_t_26, __pyx_t_28, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 852, __pyx_L1_error)
  __pyx_t_37 = ((PyArrayObject *)__pyx_t_27);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_30 < 0)) {
      PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
      }
      __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
    }
    __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 852, __pyx_L1_error)
  }
  __pyx_t_37 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_27);
  __pyx_t_27 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":853
 * 
 *     tmp4a=np.array([[[[0]]]])
 *     if counter1>=4:             # <<<<<<<<<<<<<<
 *         # remove doubling
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
  __pyx_t_1 = ((__pyx_v_counter1 >= 4) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":855
 *     if counter1>=4:
 *         # remove doubling
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 */
    __pyx_t_26 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 855, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_36) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_28 = NULL;
    __pyx_t_30 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_26))) {
      __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_26);
      if (likely(__pyx_t_28)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
        __Pyx_INCREF(__pyx_t_28);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_26, function);
        __pyx_t_30 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_26)) {
      PyObject *__pyx_temp[4] = {__pyx_t_28, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_27 = __Pyx_PyFunction_FastCall(__pyx_t_26, __pyx_temp+1-__pyx_t_30, 3+__pyx_t_30); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_GOTREF(__pyx_t_27);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_26)) {
      PyObject *__pyx_temp[4] = {__pyx_t_28, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_27 = __Pyx_PyCFunction_FastCall(__pyx_t_26, __pyx_temp+1-__pyx_t_30, 3+__pyx_t_30); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_GOTREF(__pyx_t_27);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(3+__pyx_t_30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_28) {
        __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_28); __pyx_t_28 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_30, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_30, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_30, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_27 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_4, NULL); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_27);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 855, __pyx_L1_error)
    __pyx_t_38 = ((PyArrayObject *)__pyx_t_27);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_38, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_30 < 0)) {
        PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
        }
        __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
      }
      __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
    }
    __pyx_t_38 = 0;
    __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_27);
    __pyx_t_27 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":856
 *         # remove doubling
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 * 
 *         if len(tmp3a)>=4:
 */
    __pyx_t_27 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_27), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_30 < 0)) {
        PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
        }
        __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
      }
      __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 856, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_27));
    __pyx_t_27 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":858
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 *         if len(tmp3a)>=4:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))
 */
    __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 858, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_36 >= 4) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":859
 * 
 *         if len(tmp3a)>=4:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":860
 *         if len(tmp3a)>=4:
 *             if verbose>0:
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 860, __pyx_L1_error)
        __pyx_t_27 = PyInt_FromSsize_t(__pyx_t_36); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __pyx_t_26 = PyUnicode_Format(__pyx_kp_u_number_of_points_for_tetrahedra, __pyx_t_27); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        __pyx_t_27 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_26); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":859
 * 
 *         if len(tmp3a)>=4:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))
 *             else:
 */
        goto __pyx_L20;
      }

      /* "pyqcstrc/icosah/intsct.pyx":862
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             # Tetrahedralization
 *             if coplanar_check(tmp3a)==0:
 */
      /*else*/ {
      }
      __pyx_L20:;

      /* "pyqcstrc/icosah/intsct.pyx":864
 *                 pass
 *             # Tetrahedralization
 *             if coplanar_check(tmp3a)==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp3a)==4:
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 */
      __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_v_tmp3a), 0) == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":865
 *             # Tetrahedralization
 *             if coplanar_check(tmp3a)==0:
 *                 if len(tmp3a)==4:             # <<<<<<<<<<<<<<
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 *                     if verbose>0:
 */
        __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 865, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_36 == 4) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":866
 *             if coplanar_check(tmp3a)==0:
 *                 if len(tmp3a)==4:
 *                     tmp4a=tmp3a.reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *                     if verbose>0:
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])
 */
          __pyx_t_27 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 866, __pyx_L1_error)
          __pyx_t_37 = ((PyArrayObject *)__pyx_t_26);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_37, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_30 < 0)) {
              PyErr_Fetch(&__pyx_t_33, &__pyx_t_32, &__pyx_t_31);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_33); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_31);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_33, __pyx_t_32, __pyx_t_31);
              }
              __pyx_t_33 = __pyx_t_32 = __pyx_t_31 = 0;
            }
            __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 866, __pyx_L1_error)
          }
          __pyx_t_37 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_26));
          __pyx_t_26 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":867
 *                 if len(tmp3a)==4:
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])
 *                         vol1=(a1+b1*TAU)/c1
 */
          __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":868
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 *                     if verbose>0:
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])             # <<<<<<<<<<<<<<
 *                         vol1=(a1+b1*TAU)/c1
 *                         print('              volume, %d %d %d (%8.6f)'%(a1,b1,c1,vol1))
 */
            __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 868, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_26);
            if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 868, __pyx_L1_error)
            __pyx_t_27 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_t_26), 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 868, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            if (likely(__pyx_t_27 != Py_None)) {
              PyObject* sequence = __pyx_t_27;
              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(0, 868, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_26 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
              __Pyx_INCREF(__pyx_t_26);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              #else
              __pyx_t_26 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 868, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_26);
              __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
              __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 868, __pyx_L1_error)
            }
            __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_26); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            __pyx_t_40 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_40 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_41 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_41 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_v_a1 = __pyx_t_39;
            __pyx_v_b1 = __pyx_t_40;
            __pyx_v_c1 = __pyx_t_41;

            /* "pyqcstrc/icosah/intsct.pyx":869
 *                     if verbose>0:
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])
 *                         vol1=(a1+b1*TAU)/c1             # <<<<<<<<<<<<<<
 *                         print('              volume, %d %d %d (%8.6f)'%(a1,b1,c1,vol1))
 *                         print('              volume (numerical value)',tetrahedron_volume_6d_numerical(tmp4a[0]))
 */
            __pyx_t_42 = (__pyx_v_a1 + (__pyx_v_b1 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
            if (unlikely(__pyx_v_c1 == 0)) {
              PyErr_SetString(PyExc_ZeroDivisionError, "float division");
              __PYX_ERR(0, 869, __pyx_L1_error)
            }
            __pyx_v_vol1 = (__pyx_t_42 / ((__pyx_t_5numpy_float64_t)__pyx_v_c1));

            /* "pyqcstrc/icosah/intsct.pyx":870
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])
 *                         vol1=(a1+b1*TAU)/c1
 *                         print('              volume, %d %d %d (%8.6f)'%(a1,b1,c1,vol1))             # <<<<<<<<<<<<<<
 *                         print('              volume (numerical value)',tetrahedron_volume_6d_numerical(tmp4a[0]))
 *                     else:
 */
            __pyx_t_27 = PyTuple_New(9); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_36 = 0;
            __pyx_t_43 = 127;
            __Pyx_INCREF(__pyx_kp_u_volume);
            __pyx_t_36 += 22;
            __Pyx_GIVEREF(__pyx_kp_u_volume);
            PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_kp_u_volume);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_a1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_36 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_36 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_kp_u__5);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_b1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_36 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_27, 3, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_36 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_27, 4, __pyx_kp_u__5);
            __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_c1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_36 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_27, 5, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__6);
            __pyx_t_36 += 2;
            __Pyx_GIVEREF(__pyx_kp_u__6);
            PyTuple_SET_ITEM(__pyx_t_27, 6, __pyx_kp_u__6);
            __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_43 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_43) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_43;
            __pyx_t_36 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_27, 7, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_INCREF(__pyx_kp_u__7);
            __pyx_t_36 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__7);
            PyTuple_SET_ITEM(__pyx_t_27, 8, __pyx_kp_u__7);
            __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_27, 9, __pyx_t_36, __pyx_t_43); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            __pyx_t_27 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 870, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":871
 *                         vol1=(a1+b1*TAU)/c1
 *                         print('              volume, %d %d %d (%8.6f)'%(a1,b1,c1,vol1))
 *                         print('              volume (numerical value)',tetrahedron_volume_6d_numerical(tmp4a[0]))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 871, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 871, __pyx_L1_error)
            __pyx_t_4 = PyFloat_FromDouble(__pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_t_27), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            __pyx_t_27 = PyTuple_New(2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 871, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_kp_u_volume_numerical_value);
            __Pyx_GIVEREF(__pyx_kp_u_volume_numerical_value);
            PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_kp_u_volume_numerical_value);
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":867
 *                 if len(tmp3a)==4:
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         a1,b1,c1=tetrahedron_volume_6d(tmp4a[0])
 *                         vol1=(a1+b1*TAU)/c1
 */
            goto __pyx_L23;
          }

          /* "pyqcstrc/icosah/intsct.pyx":873
 *                         print('              volume (numerical value)',tetrahedron_volume_6d_numerical(tmp4a[0]))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp4a=tetrahedralization_points(tmp3a,verbose)
 */
          /*else*/ {
          }
          __pyx_L23:;

          /* "pyqcstrc/icosah/intsct.pyx":865
 *             # Tetrahedralization
 *             if coplanar_check(tmp3a)==0:
 *                 if len(tmp3a)==4:             # <<<<<<<<<<<<<<
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 *                     if verbose>0:
 */
          goto __pyx_L22;
        }

        /* "pyqcstrc/icosah/intsct.pyx":875
 *                         pass
 *                 else:
 *                     tmp4a=tetrahedralization_points(tmp3a,verbose)             # <<<<<<<<<<<<<<
 * 
 *                 num1=len(tmp4a)
 */
        /*else*/ {
          __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_30 < 0)) {
              PyErr_Fetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_32); Py_XDECREF(__pyx_t_33);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
              }
              __pyx_t_31 = __pyx_t_32 = __pyx_t_33 = 0;
            }
            __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 875, __pyx_L1_error)
          }
          __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;
        }
        __pyx_L22:;

        /* "pyqcstrc/icosah/intsct.pyx":877
 *                     tmp4a=tetrahedralization_points(tmp3a,verbose)
 * 
 *                 num1=len(tmp4a)             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('         -> number of tetrahedron,  %d'%(num1))
 */
        __pyx_t_36 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_36 == ((Py_ssize_t)-1))) __PYX_ERR(0, 877, __pyx_L1_error)
        __pyx_v_num1 = __pyx_t_36;

        /* "pyqcstrc/icosah/intsct.pyx":878
 * 
 *                 num1=len(tmp4a)
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('         -> number of tetrahedron,  %d'%(num1))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":879
 *                 num1=len(tmp4a)
 *                 if verbose>0:
 *                     print('         -> number of tetrahedron,  %d'%(num1))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_num1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_27 = PyUnicode_Format(__pyx_kp_u_number_of_tetrahedron_d, __pyx_t_4); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_27); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":878
 * 
 *                 num1=len(tmp4a)
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('         -> number of tetrahedron,  %d'%(num1))
 *                 else:
 */
          goto __pyx_L24;
        }

        /* "pyqcstrc/icosah/intsct.pyx":881
 *                     print('         -> number of tetrahedron,  %d'%(num1))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return tmp4a
 *                 """
 */
        /*else*/ {
        }
        __pyx_L24:;

        /* "pyqcstrc/icosah/intsct.pyx":882
 *                 else:
 *                     pass
 *                 return tmp4a             # <<<<<<<<<<<<<<
 *                 """
 *                 if num1!=1:
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
        goto __pyx_L0;

        /* "pyqcstrc/icosah/intsct.pyx":864
 *                 pass
 *             # Tetrahedralization
 *             if coplanar_check(tmp3a)==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp3a)==4:
 *                     tmp4a=tmp3a.reshape(1,4,6,3)
 */
      }

      /* "pyqcstrc/icosah/intsct.pyx":933
 *                 """
 *             else:
 *                 return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             return tmp4a
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
        goto __pyx_L0;
      }

      /* "pyqcstrc/icosah/intsct.pyx":858
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 *         if len(tmp3a)>=4:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('         number of points for tetrahedralization, %d'%(len(tmp3a)))
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":935
 *                 return tmp4a
 *         else:
 *             return tmp4a             # <<<<<<<<<<<<<<
 *     else:
 *         return tmp4a
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/intsct.pyx":853
 * 
 *     tmp4a=np.array([[[[0]]]])
 *     if counter1>=4:             # <<<<<<<<<<<<<<
 *         # remove doubling
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":937
 *             return tmp4a
 *     else:
 *         return tmp4a             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":693
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray intersection_two_tetrahedron_4(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2,
 *                                                 int verbose):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_comb.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_comb.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1c);
  __Pyx_XDECREF((PyObject *)__pyx_v_comb);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v_segment_1);
  __Pyx_XDECREF(__pyx_v_segment_2);
  __Pyx_XDECREF(__pyx_v_surface_1);
  __Pyx_XDECREF(__pyx_v_surface_2);
  __Pyx_XDECREF(__pyx_v_surface_3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_9intersection_two_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_9intersection_two_tetrahedron_4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_tetrahedron_1 = 0;
  PyArrayObject *__pyx_v_tetrahedron_2 = 0;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection_two_tetrahedron_4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tetrahedron_1,&__pyx_n_s_tetrahedron_2_2,&__pyx_n_s_verbose,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tetrahedron_1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tetrahedron_2_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_tetrahedron_4", 1, 3, 3, 1); __PYX_ERR(0, 693, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("intersection_two_tetrahedron_4", 1, 3, 3, 2); __PYX_ERR(0, 693, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection_two_tetrahedron_4") < 0)) __PYX_ERR(0, 693, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_tetrahedron_1 = ((PyArrayObject *)values[0]);
    __pyx_v_tetrahedron_2 = ((PyArrayObject *)values[1]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection_two_tetrahedron_4", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 693, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tetrahedron_1), __pyx_ptype_5numpy_ndarray, 1, "tetrahedron_1", 0))) __PYX_ERR(0, 693, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tetrahedron_2), __pyx_ptype_5numpy_ndarray, 1, "tetrahedron_2", 0))) __PYX_ERR(0, 694, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_8intersection_two_tetrahedron_4(__pyx_self, __pyx_v_tetrahedron_1, __pyx_v_tetrahedron_2, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_8intersection_two_tetrahedron_4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron_1;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron_2;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_2;
  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("intersection_two_tetrahedron_4", 0);
  __pyx_pybuffer_tetrahedron_1.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_1.refcount = 0;
  __pyx_pybuffernd_tetrahedron_1.data = NULL;
  __pyx_pybuffernd_tetrahedron_1.rcbuffer = &__pyx_pybuffer_tetrahedron_1;
  __pyx_pybuffer_tetrahedron_2.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_2.refcount = 0;
  __pyx_pybuffernd_tetrahedron_2.data = NULL;
  __pyx_pybuffernd_tetrahedron_2.rcbuffer = &__pyx_pybuffer_tetrahedron_2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 693, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_1.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_1.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_1.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_1.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_1.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_1.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 693, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_2.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_2.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_2.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_2.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_2.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_2.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer.shape[2];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_2), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_tetrahedron_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":941
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray intersection_segment_surface(np.ndarray[DTYPE_int_t, ndim=2] segment_1,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=2] segment_2,
 *                                                 np.ndarray[DTYPE_int_t, ndim=2] surface_1,
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_segment_surface(PyArrayObject *__pyx_v_segment_1, PyArrayObject *__pyx_v_segment_2, PyArrayObject *__pyx_v_surface_1, PyArrayObject *__pyx_v_surface_2, PyArrayObject *__pyx_v_surface_3, int __pyx_v_verbose) {
  PyArrayObject *__pyx_v_tmp1 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_seg1i1 = 0;
  PyArrayObject *__pyx_v_seg1i2 = 0;
  PyArrayObject *__pyx_v_seg1i3 = 0;
  PyArrayObject *__pyx_v_seg2i1 = 0;
  PyArrayObject *__pyx_v_seg2i2 = 0;
  PyArrayObject *__pyx_v_seg2i3 = 0;
  PyArrayObject *__pyx_v_sur1i1 = 0;
  PyArrayObject *__pyx_v_sur1i2 = 0;
  PyArrayObject *__pyx_v_sur1i3 = 0;
  PyArrayObject *__pyx_v_sur2i1 = 0;
  PyArrayObject *__pyx_v_sur2i2 = 0;
  PyArrayObject *__pyx_v_sur2i3 = 0;
  PyArrayObject *__pyx_v_sur3i1 = 0;
  PyArrayObject *__pyx_v_sur3i2 = 0;
  PyArrayObject *__pyx_v_sur3i3 = 0;
  PyArrayObject *__pyx_v_vecBA = 0;
  PyArrayObject *__pyx_v_vecCD = 0;
  PyArrayObject *__pyx_v_vecCE = 0;
  PyArrayObject *__pyx_v_vecCA = 0;
  long __pyx_v_bx1;
  long __pyx_v_bx2;
  long __pyx_v_bx3;
  long __pyx_v_by1;
  long __pyx_v_by2;
  long __pyx_v_by3;
  long __pyx_v_bz1;
  long __pyx_v_bz2;
  long __pyx_v_bz3;
  long __pyx_v_cx1;
  long __pyx_v_cx2;
  long __pyx_v_cx3;
  long __pyx_v_cy1;
  long __pyx_v_cy2;
  long __pyx_v_cy3;
  long __pyx_v_cz1;
  long __pyx_v_cz2;
  long __pyx_v_cz3;
  long __pyx_v_dx1;
  long __pyx_v_dx2;
  long __pyx_v_dx3;
  long __pyx_v_dy1;
  long __pyx_v_dy2;
  long __pyx_v_dy3;
  long __pyx_v_dz1;
  long __pyx_v_dz2;
  long __pyx_v_dz3;
  long __pyx_v_ex1;
  long __pyx_v_ex2;
  long __pyx_v_ex3;
  long __pyx_v_ey1;
  long __pyx_v_ey2;
  long __pyx_v_ey3;
  long __pyx_v_ez1;
  long __pyx_v_ez2;
  long __pyx_v_ez3;
  long __pyx_v_f1;
  long __pyx_v_f2;
  long __pyx_v_f3;
  long __pyx_v_f4;
  long __pyx_v_f5;
  long __pyx_v_f6;
  long __pyx_v_f7;
  long __pyx_v_f8;
  long __pyx_v_f9;
  long __pyx_v_f10;
  long __pyx_v_f11;
  long __pyx_v_f12;
  long __pyx_v_g1;
  long __pyx_v_g2;
  long __pyx_v_g3;
  long __pyx_v_h1;
  long __pyx_v_h2;
  long __pyx_v_h3;
  long __pyx_v_h4;
  long __pyx_v_h5;
  long __pyx_v_h6;
  long __pyx_v_h7;
  long __pyx_v_h8;
  long __pyx_v_h9;
  long __pyx_v_h10;
  long __pyx_v_h11;
  long __pyx_v_h12;
  long __pyx_v_h13;
  long __pyx_v_h14;
  long __pyx_v_h15;
  long __pyx_v_h16;
  long __pyx_v_h17;
  long __pyx_v_h18;
  long __pyx_v_i1;
  long __pyx_v_i2;
  long __pyx_v_i3;
  long __pyx_v_i4;
  long __pyx_v_i5;
  long __pyx_v_i6;
  long __pyx_v_i7;
  long __pyx_v_i8;
  long __pyx_v_i9;
  long __pyx_v_i10;
  long __pyx_v_i11;
  long __pyx_v_i12;
  long __pyx_v_i13;
  long __pyx_v_i14;
  long __pyx_v_i15;
  long __pyx_v_i16;
  long __pyx_v_i17;
  long __pyx_v_i18;
  long __pyx_v_j1;
  long __pyx_v_j2;
  long __pyx_v_j3;
  long __pyx_v_j4;
  long __pyx_v_j5;
  long __pyx_v_j6;
  long __pyx_v_j7;
  long __pyx_v_j8;
  long __pyx_v_j9;
  long __pyx_v_j10;
  long __pyx_v_j11;
  long __pyx_v_j12;
  long __pyx_v_j13;
  long __pyx_v_j14;
  long __pyx_v_j15;
  long __pyx_v_j16;
  long __pyx_v_j17;
  long __pyx_v_j18;
  double __pyx_v_val1;
  double __pyx_v_val2;
  double __pyx_v_val3;
  double __pyx_v_val4;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1i1;
  __Pyx_Buffer __pyx_pybuffer_seg1i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1i2;
  __Pyx_Buffer __pyx_pybuffer_seg1i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1i3;
  __Pyx_Buffer __pyx_pybuffer_seg1i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2i1;
  __Pyx_Buffer __pyx_pybuffer_seg2i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2i2;
  __Pyx_Buffer __pyx_pybuffer_seg2i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2i3;
  __Pyx_Buffer __pyx_pybuffer_seg2i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_1;
  __Pyx_Buffer __pyx_pybuffer_segment_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_2;
  __Pyx_Buffer __pyx_pybuffer_segment_2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur1i1;
  __Pyx_Buffer __pyx_pybuffer_sur1i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur1i2;
  __Pyx_Buffer __pyx_pybuffer_sur1i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur1i3;
  __Pyx_Buffer __pyx_pybuffer_sur1i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur2i1;
  __Pyx_Buffer __pyx_pybuffer_sur2i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur2i2;
  __Pyx_Buffer __pyx_pybuffer_sur2i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur2i3;
  __Pyx_Buffer __pyx_pybuffer_sur2i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur3i1;
  __Pyx_Buffer __pyx_pybuffer_sur3i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur3i2;
  __Pyx_Buffer __pyx_pybuffer_sur3i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sur3i3;
  __Pyx_Buffer __pyx_pybuffer_sur3i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface_1;
  __Pyx_Buffer __pyx_pybuffer_surface_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface_2;
  __Pyx_Buffer __pyx_pybuffer_surface_2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface_3;
  __Pyx_Buffer __pyx_pybuffer_surface_3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1;
  __Pyx_Buffer __pyx_pybuffer_tmp1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vecBA;
  __Pyx_Buffer __pyx_pybuffer_vecBA;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vecCA;
  __Pyx_Buffer __pyx_pybuffer_vecCA;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vecCD;
  __Pyx_Buffer __pyx_pybuffer_vecCD;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vecCE;
  __Pyx_Buffer __pyx_pybuffer_vecCE;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyArrayObject *__pyx_t_14 = NULL;
  PyArrayObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  PyArrayObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  long __pyx_t_24;
  long __pyx_t_25;
  long __pyx_t_26;
  PyObject *__pyx_t_27 = NULL;
  PyArrayObject *__pyx_t_28 = NULL;
  PyArrayObject *__pyx_t_29 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_30;
  int __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  double __pyx_t_33;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_34;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_35;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_36;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_37;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_38;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_39;
  PyObject *__pyx_t_40 = NULL;
  PyObject *__pyx_t_41 = NULL;
  PyObject *__pyx_t_42 = NULL;
  PyObject *__pyx_t_43 = NULL;
  PyObject *__pyx_t_44 = NULL;
  PyObject *__pyx_t_45 = NULL;
  PyObject *__pyx_t_46 = NULL;
  PyObject *__pyx_t_47 = NULL;
  PyObject *__pyx_t_48 = NULL;
  PyObject *__pyx_t_49 = NULL;
  PyObject *__pyx_t_50 = NULL;
  PyObject *__pyx_t_51 = NULL;
  PyObject *__pyx_t_52 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_segment_surface", 0);
  __pyx_pybuffer_tmp1.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1.refcount = 0;
  __pyx_pybuffernd_tmp1.data = NULL;
  __pyx_pybuffernd_tmp1.rcbuffer = &__pyx_pybuffer_tmp1;
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_seg1i1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1i1.refcount = 0;
  __pyx_pybuffernd_seg1i1.data = NULL;
  __pyx_pybuffernd_seg1i1.rcbuffer = &__pyx_pybuffer_seg1i1;
  __pyx_pybuffer_seg1i2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1i2.refcount = 0;
  __pyx_pybuffernd_seg1i2.data = NULL;
  __pyx_pybuffernd_seg1i2.rcbuffer = &__pyx_pybuffer_seg1i2;
  __pyx_pybuffer_seg1i3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1i3.refcount = 0;
  __pyx_pybuffernd_seg1i3.data = NULL;
  __pyx_pybuffernd_seg1i3.rcbuffer = &__pyx_pybuffer_seg1i3;
  __pyx_pybuffer_seg2i1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2i1.refcount = 0;
  __pyx_pybuffernd_seg2i1.data = NULL;
  __pyx_pybuffernd_seg2i1.rcbuffer = &__pyx_pybuffer_seg2i1;
  __pyx_pybuffer_seg2i2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2i2.refcount = 0;
  __pyx_pybuffernd_seg2i2.data = NULL;
  __pyx_pybuffernd_seg2i2.rcbuffer = &__pyx_pybuffer_seg2i2;
  __pyx_pybuffer_seg2i3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2i3.refcount = 0;
  __pyx_pybuffernd_seg2i3.data = NULL;
  __pyx_pybuffernd_seg2i3.rcbuffer = &__pyx_pybuffer_seg2i3;
  __pyx_pybuffer_sur1i1.pybuffer.buf = NULL;
  __pyx_pybuffer_sur1i1.refcount = 0;
  __pyx_pybuffernd_sur1i1.data = NULL;
  __pyx_pybuffernd_sur1i1.rcbuffer = &__pyx_pybuffer_sur1i1;
  __pyx_pybuffer_sur1i2.pybuffer.buf = NULL;
  __pyx_pybuffer_sur1i2.refcount = 0;
  __pyx_pybuffernd_sur1i2.data = NULL;
  __pyx_pybuffernd_sur1i2.rcbuffer = &__pyx_pybuffer_sur1i2;
  __pyx_pybuffer_sur1i3.pybuffer.buf = NULL;
  __pyx_pybuffer_sur1i3.refcount = 0;
  __pyx_pybuffernd_sur1i3.data = NULL;
  __pyx_pybuffernd_sur1i3.rcbuffer = &__pyx_pybuffer_sur1i3;
  __pyx_pybuffer_sur2i1.pybuffer.buf = NULL;
  __pyx_pybuffer_sur2i1.refcount = 0;
  __pyx_pybuffernd_sur2i1.data = NULL;
  __pyx_pybuffernd_sur2i1.rcbuffer = &__pyx_pybuffer_sur2i1;
  __pyx_pybuffer_sur2i2.pybuffer.buf = NULL;
  __pyx_pybuffer_sur2i2.refcount = 0;
  __pyx_pybuffernd_sur2i2.data = NULL;
  __pyx_pybuffernd_sur2i2.rcbuffer = &__pyx_pybuffer_sur2i2;
  __pyx_pybuffer_sur2i3.pybuffer.buf = NULL;
  __pyx_pybuffer_sur2i3.refcount = 0;
  __pyx_pybuffernd_sur2i3.data = NULL;
  __pyx_pybuffernd_sur2i3.rcbuffer = &__pyx_pybuffer_sur2i3;
  __pyx_pybuffer_sur3i1.pybuffer.buf = NULL;
  __pyx_pybuffer_sur3i1.refcount = 0;
  __pyx_pybuffernd_sur3i1.data = NULL;
  __pyx_pybuffernd_sur3i1.rcbuffer = &__pyx_pybuffer_sur3i1;
  __pyx_pybuffer_sur3i2.pybuffer.buf = NULL;
  __pyx_pybuffer_sur3i2.refcount = 0;
  __pyx_pybuffernd_sur3i2.data = NULL;
  __pyx_pybuffernd_sur3i2.rcbuffer = &__pyx_pybuffer_sur3i2;
  __pyx_pybuffer_sur3i3.pybuffer.buf = NULL;
  __pyx_pybuffer_sur3i3.refcount = 0;
  __pyx_pybuffernd_sur3i3.data = NULL;
  __pyx_pybuffernd_sur3i3.rcbuffer = &__pyx_pybuffer_sur3i3;
  __pyx_pybuffer_vecBA.pybuffer.buf = NULL;
  __pyx_pybuffer_vecBA.refcount = 0;
  __pyx_pybuffernd_vecBA.data = NULL;
  __pyx_pybuffernd_vecBA.rcbuffer = &__pyx_pybuffer_vecBA;
  __pyx_pybuffer_vecCD.pybuffer.buf = NULL;
  __pyx_pybuffer_vecCD.refcount = 0;
  __pyx_pybuffernd_vecCD.data = NULL;
  __pyx_pybuffernd_vecCD.rcbuffer = &__pyx_pybuffer_vecCD;
  __pyx_pybuffer_vecCE.pybuffer.buf = NULL;
  __pyx_pybuffer_vecCE.refcount = 0;
  __pyx_pybuffernd_vecCE.data = NULL;
  __pyx_pybuffernd_vecCE.rcbuffer = &__pyx_pybuffer_vecCE;
  __pyx_pybuffer_vecCA.pybuffer.buf = NULL;
  __pyx_pybuffer_vecCA.refcount = 0;
  __pyx_pybuffernd_vecCA.data = NULL;
  __pyx_pybuffernd_vecCA.rcbuffer = &__pyx_pybuffer_vecCA;
  __pyx_pybuffer_segment_1.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_1.refcount = 0;
  __pyx_pybuffernd_segment_1.data = NULL;
  __pyx_pybuffernd_segment_1.rcbuffer = &__pyx_pybuffer_segment_1;
  __pyx_pybuffer_segment_2.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_2.refcount = 0;
  __pyx_pybuffernd_segment_2.data = NULL;
  __pyx_pybuffernd_segment_2.rcbuffer = &__pyx_pybuffer_segment_2;
  __pyx_pybuffer_surface_1.pybuffer.buf = NULL;
  __pyx_pybuffer_surface_1.refcount = 0;
  __pyx_pybuffernd_surface_1.data = NULL;
  __pyx_pybuffernd_surface_1.rcbuffer = &__pyx_pybuffer_surface_1;
  __pyx_pybuffer_surface_2.pybuffer.buf = NULL;
  __pyx_pybuffer_surface_2.refcount = 0;
  __pyx_pybuffernd_surface_2.data = NULL;
  __pyx_pybuffernd_surface_2.rcbuffer = &__pyx_pybuffer_surface_2;
  __pyx_pybuffer_surface_3.pybuffer.buf = NULL;
  __pyx_pybuffer_surface_3.refcount = 0;
  __pyx_pybuffernd_surface_3.data = NULL;
  __pyx_pybuffernd_surface_3.rcbuffer = &__pyx_pybuffer_surface_3;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_1.diminfo[0].strides = __pyx_pybuffernd_segment_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_1.diminfo[0].shape = __pyx_pybuffernd_segment_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_1.diminfo[1].strides = __pyx_pybuffernd_segment_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_1.diminfo[1].shape = __pyx_pybuffernd_segment_1.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_2.diminfo[0].strides = __pyx_pybuffernd_segment_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_2.diminfo[0].shape = __pyx_pybuffernd_segment_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_2.diminfo[1].strides = __pyx_pybuffernd_segment_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_2.diminfo[1].shape = __pyx_pybuffernd_segment_2.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_pybuffernd_surface_1.diminfo[0].strides = __pyx_pybuffernd_surface_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface_1.diminfo[0].shape = __pyx_pybuffernd_surface_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface_1.diminfo[1].strides = __pyx_pybuffernd_surface_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface_1.diminfo[1].shape = __pyx_pybuffernd_surface_1.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_pybuffernd_surface_2.diminfo[0].strides = __pyx_pybuffernd_surface_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface_2.diminfo[0].shape = __pyx_pybuffernd_surface_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface_2.diminfo[1].strides = __pyx_pybuffernd_surface_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface_2.diminfo[1].shape = __pyx_pybuffernd_surface_2.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface_3.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface_3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_pybuffernd_surface_3.diminfo[0].strides = __pyx_pybuffernd_surface_3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface_3.diminfo[0].shape = __pyx_pybuffernd_surface_3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface_3.diminfo[1].strides = __pyx_pybuffernd_surface_3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface_3.diminfo[1].shape = __pyx_pybuffernd_surface_3.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":975
 *     #verbose=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          intersection_segment_surface()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":976
 * 
 *     if verbose>0:
 *         print('          intersection_segment_surface()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":975
 *     #verbose=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          intersection_segment_surface()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":978
 *         print('          intersection_segment_surface()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #
 *     #seg1e1,seg1e2,seg1e3,seg1i1,seg1i2,seg1i3=projection(segment_1[0],segment_1[1],segment_1[2],segment_1[3],segment_1[4],segment_1[5])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":985
 *     #sur2e1,sur2e2,sur2e3,sur2i1,sur2i2,sur2i3=projection(surface_2[0],surface_2[1],surface_2[2],surface_2[3],surface_2[4],surface_2[5])
 *     #sur3e1,sur3e2,sur3e3,sur3i1,sur3i2,sur3i3=projection(surface_3[0],surface_3[1],surface_3[2],surface_3[3],surface_3[4],surface_3[5])
 *     _,_,_,seg1i1,seg1i2,seg1i3=projection(segment_1[0],segment_1[1],segment_1[2],segment_1[3],segment_1[4],segment_1[5])             # <<<<<<<<<<<<<<
 *     _,_,_,seg2i1,seg2i2,seg2i3=projection(segment_2[0],segment_2[1],segment_2[2],segment_2[3],segment_2[4],segment_2[5])
 *     _,_,_,sur1i1,sur1i2,sur1i3=projection(surface_1[0],surface_1[1],surface_1[2],surface_1[3],surface_1[4],surface_1[5])
 */
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __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_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (likely(__pyx_t_8 != Py_None)) {
    PyObject* sequence = __pyx_t_8;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 985, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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_t_4 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_7,&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 985, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 985, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error)
  __pyx_v__ = __pyx_t_7;
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1i1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg1i1.diminfo[0].strides = __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1i1.diminfo[0].shape = __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1i1 = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i2.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1i2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg1i2.diminfo[0].strides = __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1i2.diminfo[0].shape = __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1i2 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i3.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1i3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1i3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg1i3.diminfo[0].strides = __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1i3.diminfo[0].shape = __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1i3 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":986
 *     #sur3e1,sur3e2,sur3e3,sur3i1,sur3i2,sur3i3=projection(surface_3[0],surface_3[1],surface_3[2],surface_3[3],surface_3[4],surface_3[5])
 *     _,_,_,seg1i1,seg1i2,seg1i3=projection(segment_1[0],segment_1[1],segment_1[2],segment_1[3],segment_1[4],segment_1[5])
 *     _,_,_,seg2i1,seg2i2,seg2i3=projection(segment_2[0],segment_2[1],segment_2[2],segment_2[3],segment_2[4],segment_2[5])             # <<<<<<<<<<<<<<
 *     _,_,_,sur1i1,sur1i2,sur1i3=projection(surface_1[0],surface_1[1],surface_1[2],surface_1[3],surface_1[4],surface_1[5])
 *     _,_,_,sur2i1,sur2i2,sur2i3=projection(surface_2[0],surface_2[1],surface_2[2],surface_2[3],surface_2[4],surface_2[5])
 */
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(__pyx_t_7 != Py_None)) {
    PyObject* sequence = __pyx_t_7;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 986, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 986, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 986, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i1.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2i1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg2i1.diminfo[0].strides = __pyx_pybuffernd_seg2i1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2i1.diminfo[0].shape = __pyx_pybuffernd_seg2i1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 986, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2i1 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i2.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2i2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg2i2.diminfo[0].strides = __pyx_pybuffernd_seg2i2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2i2.diminfo[0].shape = __pyx_pybuffernd_seg2i2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 986, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2i2 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i3.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2i3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2i3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg2i3.diminfo[0].strides = __pyx_pybuffernd_seg2i3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2i3.diminfo[0].shape = __pyx_pybuffernd_seg2i3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 986, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2i3 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":987
 *     _,_,_,seg1i1,seg1i2,seg1i3=projection(segment_1[0],segment_1[1],segment_1[2],segment_1[3],segment_1[4],segment_1[5])
 *     _,_,_,seg2i1,seg2i2,seg2i3=projection(segment_2[0],segment_2[1],segment_2[2],segment_2[3],segment_2[4],segment_2[5])
 *     _,_,_,sur1i1,sur1i2,sur1i3=projection(surface_1[0],surface_1[1],surface_1[2],surface_1[3],surface_1[4],surface_1[5])             # <<<<<<<<<<<<<<
 *     _,_,_,sur2i1,sur2i2,sur2i3=projection(surface_2[0],surface_2[1],surface_2[2],surface_2[3],surface_2[4],surface_2[5])
 *     _,_,_,sur3i1,sur3i2,sur3i3=projection(surface_3[0],surface_3[1],surface_3[2],surface_3[3],surface_3[4],surface_3[5])
 */
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_t_6 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(__pyx_t_6 != Py_None)) {
    PyObject* sequence = __pyx_t_6;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 987, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8,&__pyx_t_7};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 987, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 987, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_15 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i1.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i1.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur1i1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_sur1i1.diminfo[0].strides = __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur1i1.diminfo[0].shape = __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
  }
  __pyx_t_15 = 0;
  __pyx_v_sur1i1 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_15 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i2.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i2.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur1i2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_sur1i2.diminfo[0].strides = __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur1i2.diminfo[0].shape = __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
  }
  __pyx_t_15 = 0;
  __pyx_v_sur1i2 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_15 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i3.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur1i3.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur1i3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_sur1i3.diminfo[0].strides = __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur1i3.diminfo[0].shape = __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
  }
  __pyx_t_15 = 0;
  __pyx_v_sur1i3 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":988
 *     _,_,_,seg2i1,seg2i2,seg2i3=projection(segment_2[0],segment_2[1],segment_2[2],segment_2[3],segment_2[4],segment_2[5])
 *     _,_,_,sur1i1,sur1i2,sur1i3=projection(surface_1[0],surface_1[1],surface_1[2],surface_1[3],surface_1[4],surface_1[5])
 *     _,_,_,sur2i1,sur2i2,sur2i3=projection(surface_2[0],surface_2[1],surface_2[2],surface_2[3],surface_2[4],surface_2[5])             # <<<<<<<<<<<<<<
 *     _,_,_,sur3i1,sur3i2,sur3i3=projection(surface_3[0],surface_3[1],surface_3[2],surface_3[3],surface_3[4],surface_3[5])
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 988, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8,&__pyx_t_7,&__pyx_t_6};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 988, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i1.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i1.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur2i1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_sur2i1.diminfo[0].strides = __pyx_pybuffernd_sur2i1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur2i1.diminfo[0].shape = __pyx_pybuffernd_sur2i1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_sur2i1 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i2.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i2.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur2i2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_sur2i2.diminfo[0].strides = __pyx_pybuffernd_sur2i2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur2i2.diminfo[0].shape = __pyx_pybuffernd_sur2i2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_sur2i2 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i3.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur2i3.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur2i3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_sur2i3.diminfo[0].strides = __pyx_pybuffernd_sur2i3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur2i3.diminfo[0].shape = __pyx_pybuffernd_sur2i3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_sur2i3 = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":989
 *     _,_,_,sur1i1,sur1i2,sur1i3=projection(surface_1[0],surface_1[1],surface_1[2],surface_1[3],surface_1[4],surface_1[5])
 *     _,_,_,sur2i1,sur2i2,sur2i3=projection(surface_2[0],surface_2[1],surface_2[2],surface_2[3],surface_2[4],surface_2[5])
 *     _,_,_,sur3i1,sur3i2,sur3i3=projection(surface_3[0],surface_3[1],surface_3[2],surface_3[3],surface_3[4],surface_3[5])             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_3), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 989, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_8,&__pyx_t_7,&__pyx_t_6,&__pyx_t_5};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 989, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 989, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i1.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i1.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur3i1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_sur3i1.diminfo[0].strides = __pyx_pybuffernd_sur3i1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur3i1.diminfo[0].shape = __pyx_pybuffernd_sur3i1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 989, __pyx_L1_error)
  }
  __pyx_t_17 = 0;
  __pyx_v_sur3i1 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i2.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i2.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur3i2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_sur3i2.diminfo[0].strides = __pyx_pybuffernd_sur3i2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur3i2.diminfo[0].shape = __pyx_pybuffernd_sur3i2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 989, __pyx_L1_error)
  }
  __pyx_t_17 = 0;
  __pyx_v_sur3i2 = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i3.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sur3i3.rcbuffer->pybuffer, (PyObject*)__pyx_v_sur3i3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_sur3i3.diminfo[0].strides = __pyx_pybuffernd_sur3i3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sur3i3.diminfo[0].shape = __pyx_pybuffernd_sur3i3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 989, __pyx_L1_error)
  }
  __pyx_t_17 = 0;
  __pyx_v_sur3i3 = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1004
 *     #bz1,bz2,bz3=sub(seg2i3[0],seg2i3[1],seg2i3[2],seg1i3[0],seg1i3[1],seg1i3[2])
 *     # BA
 *     [bx1,bx2,bx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],seg2i1[0],seg2i1[1],seg2i1[2])             # <<<<<<<<<<<<<<
 *     [by1,by2,by3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],seg2i2[0],seg2i2[1],seg2i2[2])
 *     [bz1,bz2,bz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],seg2i3[0],seg2i3[1],seg2i3[2])
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_seg2i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_seg2i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i1.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_seg2i1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1004, __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_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(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1004, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_bx1 = __pyx_t_24;
  __pyx_v_bx2 = __pyx_t_25;
  __pyx_v_bx3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1005
 *     # BA
 *     [bx1,bx2,bx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],seg2i1[0],seg2i1[1],seg2i1[2])
 *     [by1,by2,by3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],seg2i2[0],seg2i2[1],seg2i2[2])             # <<<<<<<<<<<<<<
 *     [bz1,bz2,bz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],seg2i3[0],seg2i3[1],seg2i3[2])
 *     # plane CDE
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2i2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1005, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1005, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_by1 = __pyx_t_26;
  __pyx_v_by2 = __pyx_t_25;
  __pyx_v_by3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1006
 *     [bx1,bx2,bx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],seg2i1[0],seg2i1[1],seg2i1[2])
 *     [by1,by2,by3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],seg2i2[0],seg2i2[1],seg2i2[2])
 *     [bz1,bz2,bz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],seg2i3[0],seg2i3[1],seg2i3[2])             # <<<<<<<<<<<<<<
 *     # plane CDE
 *     # AC
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i3.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_seg2i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i3.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_seg2i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2i3.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_seg2i3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1006, __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_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(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1006, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_bz1 = __pyx_t_24;
  __pyx_v_bz2 = __pyx_t_25;
  __pyx_v_bz3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1013
 *     #cz1,cz2,cz3=sub(sur1i3[0],sur1i3[1],sur1i3[2],seg1i3[0],seg1i3[1],seg1i3[2])
 *     # CA
 *     [cx1,cx2,cx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],sur1i1[0],sur1i1[1],sur1i1[2])             # <<<<<<<<<<<<<<
 *     [cy1,cy2,cy3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [cz1,cz2,cz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_seg1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1013, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1013, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cx1 = __pyx_t_26;
  __pyx_v_cx2 = __pyx_t_25;
  __pyx_v_cx3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1014
 *     # CA
 *     [cx1,cx2,cx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [cy1,cy2,cy3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],sur1i2[0],sur1i2[1],sur1i2[2])             # <<<<<<<<<<<<<<
 *     [cz1,cz2,cz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 *     # CD
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1014, __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_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(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1014, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cy1 = __pyx_t_24;
  __pyx_v_cy2 = __pyx_t_25;
  __pyx_v_cy3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1015
 *     [cx1,cx2,cx3]=sub(seg1i1[0],seg1i1[1],seg1i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [cy1,cy2,cy3]=sub(seg1i2[0],seg1i2[1],seg1i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [cz1,cz2,cz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],sur1i3[0],sur1i3[1],sur1i3[2])             # <<<<<<<<<<<<<<
 *     # CD
 *     [dx1,dx2,dx3]=sub(sur2i1[0],sur2i1[1],sur2i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1i3.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_seg1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1015, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1015, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cz1 = __pyx_t_26;
  __pyx_v_cz2 = __pyx_t_25;
  __pyx_v_cz3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1017
 *     [cz1,cz2,cz3]=sub(seg1i3[0],seg1i3[1],seg1i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 *     # CD
 *     [dx1,dx2,dx3]=sub(sur2i1[0],sur2i1[1],sur2i1[2],sur1i1[0],sur1i1[1],sur1i1[2])             # <<<<<<<<<<<<<<
 *     [dy1,dy2,dy3]=sub(sur2i2[0],sur2i2[1],sur2i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [dz1,dz2,dz3]=sub(sur2i3[0],sur2i3[1],sur2i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur2i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur2i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur2i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1017, __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_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(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1017, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_dx1 = __pyx_t_24;
  __pyx_v_dx2 = __pyx_t_25;
  __pyx_v_dx3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1018
 *     # CD
 *     [dx1,dx2,dx3]=sub(sur2i1[0],sur2i1[1],sur2i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [dy1,dy2,dy3]=sub(sur2i2[0],sur2i2[1],sur2i2[2],sur1i2[0],sur1i2[1],sur1i2[2])             # <<<<<<<<<<<<<<
 *     [dz1,dz2,dz3]=sub(sur2i3[0],sur2i3[1],sur2i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 *     # CE
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur2i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i2.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur2i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i2.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur2i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1018, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1018, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_dy1 = __pyx_t_26;
  __pyx_v_dy2 = __pyx_t_25;
  __pyx_v_dy3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1019
 *     [dx1,dx2,dx3]=sub(sur2i1[0],sur2i1[1],sur2i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [dy1,dy2,dy3]=sub(sur2i2[0],sur2i2[1],sur2i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [dz1,dz2,dz3]=sub(sur2i3[0],sur2i3[1],sur2i3[2],sur1i3[0],sur1i3[1],sur1i3[2])             # <<<<<<<<<<<<<<
 *     # CE
 *     [ex1,ex2,ex3]=sub(sur3i1[0],sur3i1[1],sur3i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur2i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur2i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur2i3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur2i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1019, __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_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(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1019, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_dz1 = __pyx_t_24;
  __pyx_v_dz2 = __pyx_t_25;
  __pyx_v_dz3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1021
 *     [dz1,dz2,dz3]=sub(sur2i3[0],sur2i3[1],sur2i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 *     # CE
 *     [ex1,ex2,ex3]=sub(sur3i1[0],sur3i1[1],sur3i1[2],sur1i1[0],sur1i1[1],sur1i1[2])             # <<<<<<<<<<<<<<
 *     [ey1,ey2,ey3]=sub(sur3i2[0],sur3i2[1],sur3i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [ez1,ez2,ez3]=sub(sur3i3[0],sur3i3[1],sur3i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i1.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur3i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur3i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur3i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur1i1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1021, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1021, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ex1 = __pyx_t_26;
  __pyx_v_ex2 = __pyx_t_25;
  __pyx_v_ex3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1022
 *     # CE
 *     [ex1,ex2,ex3]=sub(sur3i1[0],sur3i1[1],sur3i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [ey1,ey2,ey3]=sub(sur3i2[0],sur3i2[1],sur3i2[2],sur1i2[0],sur1i2[1],sur1i2[2])             # <<<<<<<<<<<<<<
 *     [ez1,ez2,ez3]=sub(sur3i3[0],sur3i3[1],sur3i3[2],sur1i3[0],sur1i3[1],sur1i3[2])
 *     #
 */
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_21 = 0;
  __pyx_t_22 = 1;
  __pyx_t_23 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur3i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur3i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur3i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur1i2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1022, __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_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(0, 1022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1022, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_ey1 = __pyx_t_24;
  __pyx_v_ey2 = __pyx_t_25;
  __pyx_v_ey3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1023
 *     [ex1,ex2,ex3]=sub(sur3i1[0],sur3i1[1],sur3i1[2],sur1i1[0],sur1i1[1],sur1i1[2])
 *     [ey1,ey2,ey3]=sub(sur3i2[0],sur3i2[1],sur3i2[2],sur1i2[0],sur1i2[1],sur1i2[2])
 *     [ez1,ez2,ez3]=sub(sur3i3[0],sur3i3[1],sur3i3[2],sur1i3[0],sur1i3[1],sur1i3[2])             # <<<<<<<<<<<<<<
 *     #
 *     #vecBA=np.array([[-bx1,-bx2, bx3],[-by1,-by2, by3],[-bz1,-bz2, bz3]]) # line segment BA = -AB
 */
  __pyx_t_23 = 0;
  __pyx_t_22 = 1;
  __pyx_t_21 = 2;
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i3.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_sur3i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i3.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sur3i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur3i3.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_sur3i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_sur1i3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sur1i3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1023, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1023, __pyx_L1_error)
  }
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ez1 = __pyx_t_26;
  __pyx_v_ez2 = __pyx_t_25;
  __pyx_v_ez3 = __pyx_t_24;

  /* "pyqcstrc/icosah/intsct.pyx":1026
 *     #
 *     #vecBA=np.array([[-bx1,-bx2, bx3],[-by1,-by2, by3],[-bz1,-bz2, bz3]]) # line segment BA = -AB
 *     vecBA=np.array([[ bx1, bx2, bx3],[ by1, by2, by3],[ bz1, bz2, bz3]]) # line segment BA             # <<<<<<<<<<<<<<
 *     vecCD=np.array([[ dx1, dx2, dx3],[ dy1, dy2, dy3],[ dz1, dz2, dz3]]) # edge segment of triangle CDE, CD
 *     vecCE=np.array([[ ex1, ex2, ex3],[ ey1, ey2, ey3],[ ez1, ez2, ez3]]) # edge segment of triangle CDE, CE
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_bx1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_bx2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_bx3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_by1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_by2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_by3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
  __pyx_t_8 = 0;
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_bz1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_bz2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_bz3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_27);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_27, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1026, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecBA.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecBA.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecBA.rcbuffer->pybuffer, (PyObject*)__pyx_v_vecBA, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_vecBA.diminfo[0].strides = __pyx_pybuffernd_vecBA.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vecBA.diminfo[0].shape = __pyx_pybuffernd_vecBA.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vecBA.diminfo[1].strides = __pyx_pybuffernd_vecBA.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vecBA.diminfo[1].shape = __pyx_pybuffernd_vecBA.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1026, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_vecBA = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1027
 *     #vecBA=np.array([[-bx1,-bx2, bx3],[-by1,-by2, by3],[-bz1,-bz2, bz3]]) # line segment BA = -AB
 *     vecBA=np.array([[ bx1, bx2, bx3],[ by1, by2, by3],[ bz1, bz2, bz3]]) # line segment BA
 *     vecCD=np.array([[ dx1, dx2, dx3],[ dy1, dy2, dy3],[ dz1, dz2, dz3]]) # edge segment of triangle CDE, CD             # <<<<<<<<<<<<<<
 *     vecCE=np.array([[ ex1, ex2, ex3],[ ey1, ey2, ey3],[ ez1, ez2, ez3]]) # edge segment of triangle CDE, CE
 *     #vecCA=np.array([[-cx1,-cx2, cx3],[-cy1,-cy2, cy3],[-cz1,-cz2, cz3]]) # CA = -AC
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_dx1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_dx2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_dx3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_3);
  __pyx_t_6 = 0;
  __pyx_t_27 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_dy1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_dy2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_dy3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_27 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_dz1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_dz2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_dz3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __pyx_t_6 = 0;
  __pyx_t_27 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1027, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCD.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCD.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCD.rcbuffer->pybuffer, (PyObject*)__pyx_v_vecCD, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_vecCD.diminfo[0].strides = __pyx_pybuffernd_vecCD.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vecCD.diminfo[0].shape = __pyx_pybuffernd_vecCD.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vecCD.diminfo[1].strides = __pyx_pybuffernd_vecCD.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vecCD.diminfo[1].shape = __pyx_pybuffernd_vecCD.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1027, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_vecCD = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1028
 *     vecBA=np.array([[ bx1, bx2, bx3],[ by1, by2, by3],[ bz1, bz2, bz3]]) # line segment BA
 *     vecCD=np.array([[ dx1, dx2, dx3],[ dy1, dy2, dy3],[ dz1, dz2, dz3]]) # edge segment of triangle CDE, CD
 *     vecCE=np.array([[ ex1, ex2, ex3],[ ey1, ey2, ey3],[ ez1, ez2, ez3]]) # edge segment of triangle CDE, CE             # <<<<<<<<<<<<<<
 *     #vecCA=np.array([[-cx1,-cx2, cx3],[-cy1,-cy2, cy3],[-cz1,-cz2, cz3]]) # CA = -AC
 *     vecCA=np.array([[ cx1, cx2, cx3],[ cy1, cy2, cy3],[ cz1, cz2, cz3]]) # CA
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ex1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ex2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_ex3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
  __pyx_t_8 = 0;
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_ey1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ey2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ey3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ez1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ez2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_ez3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
  __pyx_t_8 = 0;
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_27 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCE.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCE.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCE.rcbuffer->pybuffer, (PyObject*)__pyx_v_vecCE, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_vecCE.diminfo[0].strides = __pyx_pybuffernd_vecCE.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vecCE.diminfo[0].shape = __pyx_pybuffernd_vecCE.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vecCE.diminfo[1].strides = __pyx_pybuffernd_vecCE.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vecCE.diminfo[1].shape = __pyx_pybuffernd_vecCE.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1028, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_vecCE = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1030
 *     vecCE=np.array([[ ex1, ex2, ex3],[ ey1, ey2, ey3],[ ez1, ez2, ez3]]) # edge segment of triangle CDE, CE
 *     #vecCA=np.array([[-cx1,-cx2, cx3],[-cy1,-cy2, cy3],[-cz1,-cz2, cz3]]) # CA = -AC
 *     vecCA=np.array([[ cx1, cx2, cx3],[ cy1, cy2, cy3],[ cz1, cz2, cz3]]) # CA             # <<<<<<<<<<<<<<
 *     #
 *     # below part consists of numerica calculations....
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_27);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __pyx_t_27 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_27);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_8);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_27);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __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_5numpy_ndarray))))) __PYX_ERR(0, 1030, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCA.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCA.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vecCA.rcbuffer->pybuffer, (PyObject*)__pyx_v_vecCA, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_vecCA.diminfo[0].strides = __pyx_pybuffernd_vecCA.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vecCA.diminfo[0].shape = __pyx_pybuffernd_vecCA.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vecCA.diminfo[1].strides = __pyx_pybuffernd_vecCA.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vecCA.diminfo[1].shape = __pyx_pybuffernd_vecCA.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1030, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_vecCA = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1034
 *     # below part consists of numerica calculations....
 *     #
 *     tmp1=np.array([0])             # <<<<<<<<<<<<<<
 *     f1,f2,f3=det_matrix(vecCD,vecCE,vecBA)
 *     val1=(f1+f2*TAU)/(f3)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_27);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_27, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_27, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_27, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_t_29 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1034, __pyx_L1_error)
  }
  __pyx_t_29 = 0;
  __pyx_v_tmp1 = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1035
 *     #
 *     tmp1=np.array([0])
 *     f1,f2,f3=det_matrix(vecCD,vecCE,vecBA)             # <<<<<<<<<<<<<<
 *     val1=(f1+f2*TAU)/(f3)
 *     if f1==0 and f2==0:
 */
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_det_matrix(((PyArrayObject *)__pyx_v_vecCD), ((PyArrayObject *)__pyx_v_vecCE), ((PyArrayObject *)__pyx_v_vecBA), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1035, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_27);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1035, __pyx_L1_error)
  }
  __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_f1 = __pyx_t_24;
  __pyx_v_f2 = __pyx_t_25;
  __pyx_v_f3 = __pyx_t_26;

  /* "pyqcstrc/icosah/intsct.pyx":1036
 *     tmp1=np.array([0])
 *     f1,f2,f3=det_matrix(vecCD,vecCE,vecBA)
 *     val1=(f1+f2*TAU)/(f3)             # <<<<<<<<<<<<<<
 *     if f1==0 and f2==0:
 *         if verbose>1:
 */
  __pyx_t_30 = (__pyx_v_f1 + (__pyx_v_f2 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
  if (unlikely(__pyx_v_f3 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1036, __pyx_L1_error)
  }
  __pyx_v_val1 = (__pyx_t_30 / ((__pyx_t_5numpy_float64_t)__pyx_v_f3));

  /* "pyqcstrc/icosah/intsct.pyx":1037
 *     f1,f2,f3=det_matrix(vecCD,vecCE,vecBA)
 *     val1=(f1+f2*TAU)/(f3)
 *     if f1==0 and f2==0:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('          line segment and triangle are parallel')
 */
  __pyx_t_31 = ((__pyx_v_f1 == 0) != 0);
  if (__pyx_t_31) {
  } else {
    __pyx_t_1 = __pyx_t_31;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_31 = ((__pyx_v_f2 == 0) != 0);
  __pyx_t_1 = __pyx_t_31;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1038
 *     val1=(f1+f2*TAU)/(f3)
 *     if f1==0 and f2==0:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('          line segment and triangle are parallel')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1039
 *     if f1==0 and f2==0:
 *         if verbose>1:
 *             print('          line segment and triangle are parallel')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1038
 *     val1=(f1+f2*TAU)/(f3)
 *     if f1==0 and f2==0:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('          line segment and triangle are parallel')
 *         else:
 */
      goto __pyx_L7;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1041
 *             print('          line segment and triangle are parallel')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)
 *         if len(tmp1a)!=1:
 */
    /*else*/ {
    }
    __pyx_L7:;

    /* "pyqcstrc/icosah/intsct.pyx":1042
 *         else:
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_segment(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_1), ((PyArrayObject *)__pyx_v_surface_2), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        }
        __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
      }
      __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1042, __pyx_L1_error)
    }
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1043
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
    __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1043, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_32 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1044
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
      __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1044, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_32 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1045
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
            }
            __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1045, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_DECREF_SET(__pyx_v_tmp1, __pyx_v_tmp1a);

        /* "pyqcstrc/icosah/intsct.pyx":1044
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
        goto __pyx_L9;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1047
 *                 tmp1=tmp1a
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_append); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_27 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1047, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_27, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
          PyTuple_SET_ITEM(__pyx_t_27, 1+__pyx_t_10, ((PyObject *)__pyx_v_tmp1));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1047, __pyx_L1_error)
        __pyx_t_29 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            }
            __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1047, __pyx_L1_error)
        }
        __pyx_t_29 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L9:;

      /* "pyqcstrc/icosah/intsct.pyx":1043
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_2,verbose-1)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1049
 *                 tmp1=np.append(tmp1a,tmp1)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)
 *         if len(tmp1a)!=1:
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/intsct.pyx":1050
 *         else:
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_segment(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_1), ((PyArrayObject *)__pyx_v_surface_3), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
        }
        __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1050, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1051
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
    __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1051, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_32 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1052
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
      __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1052, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_32 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1053
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            }
            __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1053, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_DECREF_SET(__pyx_v_tmp1, __pyx_v_tmp1a);

        /* "pyqcstrc/icosah/intsct.pyx":1052
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1055
 *                 tmp1=tmp1a
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_append); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_27);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_27, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_27)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_27)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1055, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_7) {
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, ((PyObject *)__pyx_v_tmp1));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1055, __pyx_L1_error)
        __pyx_t_29 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
            }
            __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1055, __pyx_L1_error)
        }
        __pyx_t_29 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L11:;

      /* "pyqcstrc/icosah/intsct.pyx":1051
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_1,surface_3,verbose-1)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
      goto __pyx_L10;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1057
 *                 tmp1=np.append(tmp1a,tmp1)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)
 *         if len(tmp1a)!=1:
 */
    /*else*/ {
    }
    __pyx_L10:;

    /* "pyqcstrc/icosah/intsct.pyx":1058
 *         else:
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_segment(((PyArrayObject *)__pyx_v_segment_1), ((PyArrayObject *)__pyx_v_segment_2), ((PyArrayObject *)__pyx_v_surface_2), ((PyArrayObject *)__pyx_v_surface_3), __pyx_v_verbose)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        }
        __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
      }
      __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1058, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1059
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
    __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1059, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_32 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1060
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
      __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1060, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_32 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1061
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
            }
            __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1061, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_DECREF_SET(__pyx_v_tmp1, __pyx_v_tmp1a);

        /* "pyqcstrc/icosah/intsct.pyx":1060
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)
 *         if len(tmp1a)!=1:
 *             if len(tmp1)==1:             # <<<<<<<<<<<<<<
 *                 tmp1=tmp1a
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1063
 *                 tmp1=tmp1a
 *             else:
 *                 tmp1=np.append(tmp1a,tmp1)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_n_s_np); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1063, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1063, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        __pyx_t_27 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_27)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_27, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_27, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1)};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1063, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_27) {
            __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_27); __pyx_t_27 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, ((PyObject *)__pyx_v_tmp1));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1063, __pyx_L1_error)
        __pyx_t_29 = ((PyArrayObject *)__pyx_t_4);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_10 < 0)) {
            PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            }
            __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
          }
          __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1063, __pyx_L1_error)
        }
        __pyx_t_29 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/intsct.pyx":1059
 *             pass
 *         tmp1a=intersection_two_segment(segment_1,segment_2,surface_2,surface_3,verbose)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if len(tmp1)==1:
 *                 tmp1=tmp1a
 */
      goto __pyx_L12;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1065
 *                 tmp1=np.append(tmp1a,tmp1)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('          Intersectiong point:',tmp1)
 */
    /*else*/ {
    }
    __pyx_L12:;

    /* "pyqcstrc/icosah/intsct.pyx":1066
 *         else:
 *             pass
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          Intersectiong point:',tmp1)
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1067
 *             pass
 *         if verbose>0:
 *             print('          Intersectiong point:',tmp1)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_kp_u_Intersectiong_point);
      __Pyx_GIVEREF(__pyx_kp_u_Intersectiong_point);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Intersectiong_point);
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_tmp1));
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1066
 *         else:
 *             pass
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          Intersectiong point:',tmp1)
 *         else:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1069
 *             print('          Intersectiong point:',tmp1)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp1
 *     else:
 */
    /*else*/ {
    }
    __pyx_L14:;

    /* "pyqcstrc/icosah/intsct.pyx":1070
 *         else:
 *             pass
 *         return tmp1             # <<<<<<<<<<<<<<
 *     else:
 *         f4,f5,f6=det_matrix(vecCA,vecCE,vecBA)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp1);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":1037
 *     f1,f2,f3=det_matrix(vecCD,vecCE,vecBA)
 *     val1=(f1+f2*TAU)/(f3)
 *     if f1==0 and f2==0:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('          line segment and triangle are parallel')
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":1072
 *         return tmp1
 *     else:
 *         f4,f5,f6=det_matrix(vecCA,vecCE,vecBA)             # <<<<<<<<<<<<<<
 *         val2=(f4+f5*TAU)/f6
 *         #
 */
  /*else*/ {
    __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_det_matrix(((PyArrayObject *)__pyx_v_vecCA), ((PyArrayObject *)__pyx_v_vecCE), ((PyArrayObject *)__pyx_v_vecBA), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (likely(__pyx_t_8 != Py_None)) {
      PyObject* sequence = __pyx_t_8;
      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(0, 1072, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_27);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_27);
      #endif
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1072, __pyx_L1_error)
    }
    __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    __pyx_v_f4 = __pyx_t_26;
    __pyx_v_f5 = __pyx_t_25;
    __pyx_v_f6 = __pyx_t_24;

    /* "pyqcstrc/icosah/intsct.pyx":1073
 *     else:
 *         f4,f5,f6=det_matrix(vecCA,vecCE,vecBA)
 *         val2=(f4+f5*TAU)/f6             # <<<<<<<<<<<<<<
 *         #
 *         #   u = val2/val1:
 */
    __pyx_t_30 = (__pyx_v_f4 + (__pyx_v_f5 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    if (unlikely(__pyx_v_f6 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1073, __pyx_L1_error)
    }
    __pyx_v_val2 = (__pyx_t_30 / ((__pyx_t_5numpy_float64_t)__pyx_v_f6));

    /* "pyqcstrc/icosah/intsct.pyx":1083
 *         #   t = val4/val1:
 *         #  g1,g2,g3 = div(f10,f11,f12,f1,f2,f3)
 *         if val2/val1>=0.0 and val2/val1<=1.0:             # <<<<<<<<<<<<<<
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)
 *             val3=(f7+f8*TAU)/f9
 */
    if (unlikely(__pyx_v_val1 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1083, __pyx_L1_error)
    }
    __pyx_t_31 = (((__pyx_v_val2 / __pyx_v_val1) >= 0.0) != 0);
    if (__pyx_t_31) {
    } else {
      __pyx_t_1 = __pyx_t_31;
      goto __pyx_L16_bool_binop_done;
    }
    if (unlikely(__pyx_v_val1 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1083, __pyx_L1_error)
    }
    __pyx_t_31 = (((__pyx_v_val2 / __pyx_v_val1) <= 1.0) != 0);
    __pyx_t_1 = __pyx_t_31;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1084
 *         #  g1,g2,g3 = div(f10,f11,f12,f1,f2,f3)
 *         if val2/val1>=0.0 and val2/val1<=1.0:
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)             # <<<<<<<<<<<<<<
 *             val3=(f7+f8*TAU)/f9
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:
 */
      __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_det_matrix(((PyArrayObject *)__pyx_v_vecCD), ((PyArrayObject *)__pyx_v_vecCA), ((PyArrayObject *)__pyx_v_vecBA), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (likely(__pyx_t_8 != Py_None)) {
        PyObject* sequence = __pyx_t_8;
        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(0, 1084, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
        __Pyx_INCREF(__pyx_t_27);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_27);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1084, __pyx_L1_error)
      }
      __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
      __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_f7 = __pyx_t_24;
      __pyx_v_f8 = __pyx_t_25;
      __pyx_v_f9 = __pyx_t_26;

      /* "pyqcstrc/icosah/intsct.pyx":1085
 *         if val2/val1>=0.0 and val2/val1<=1.0:
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)
 *             val3=(f7+f8*TAU)/f9             # <<<<<<<<<<<<<<
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 */
      __pyx_t_30 = (__pyx_v_f7 + (__pyx_v_f8 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
      if (unlikely(__pyx_v_f9 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1085, __pyx_L1_error)
      }
      __pyx_v_val3 = (__pyx_t_30 / ((__pyx_t_5numpy_float64_t)__pyx_v_f9));

      /* "pyqcstrc/icosah/intsct.pyx":1086
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)
 *             val3=(f7+f8*TAU)/f9
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:             # <<<<<<<<<<<<<<
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 *                 val4=(f10+f11*TAU)/f12
 */
      if (unlikely(__pyx_v_val1 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1086, __pyx_L1_error)
      }
      __pyx_t_31 = (((__pyx_v_val3 / __pyx_v_val1) >= 0.0) != 0);
      if (__pyx_t_31) {
      } else {
        __pyx_t_1 = __pyx_t_31;
        goto __pyx_L19_bool_binop_done;
      }
      __pyx_t_33 = (__pyx_v_val2 + __pyx_v_val3);
      if (unlikely(__pyx_v_val1 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1086, __pyx_L1_error)
      }
      __pyx_t_31 = (((__pyx_t_33 / __pyx_v_val1) <= 1.0) != 0);
      __pyx_t_1 = __pyx_t_31;
      __pyx_L19_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1087
 *             val3=(f7+f8*TAU)/f9
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)             # <<<<<<<<<<<<<<
 *                 val4=(f10+f11*TAU)/f12
 *                 if val4/val1>=0.0 and val4/val1<=1.0: # t = val4/val1
 */
        __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_det_matrix(((PyArrayObject *)__pyx_v_vecCD), ((PyArrayObject *)__pyx_v_vecCE), ((PyArrayObject *)__pyx_v_vecCA), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (likely(__pyx_t_8 != Py_None)) {
          PyObject* sequence = __pyx_t_8;
          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(0, 1087, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_27);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          #endif
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1087, __pyx_L1_error)
        }
        __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
        __pyx_v_f10 = __pyx_t_26;
        __pyx_v_f11 = __pyx_t_25;
        __pyx_v_f12 = __pyx_t_24;

        /* "pyqcstrc/icosah/intsct.pyx":1088
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 *                 val4=(f10+f11*TAU)/f12             # <<<<<<<<<<<<<<
 *                 if val4/val1>=0.0 and val4/val1<=1.0: # t = val4/val1
 *                     g1,g2,g3=div(f10,f11,f12,f1,f2,f3) # t in TAU-style
 */
        __pyx_t_30 = (__pyx_v_f10 + (__pyx_v_f11 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
        if (unlikely(__pyx_v_f12 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1088, __pyx_L1_error)
        }
        __pyx_v_val4 = (__pyx_t_30 / ((__pyx_t_5numpy_float64_t)__pyx_v_f12));

        /* "pyqcstrc/icosah/intsct.pyx":1089
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 *                 val4=(f10+f11*TAU)/f12
 *                 if val4/val1>=0.0 and val4/val1<=1.0: # t = val4/val1             # <<<<<<<<<<<<<<
 *                     g1,g2,g3=div(f10,f11,f12,f1,f2,f3) # t in TAU-style
 *                     #
 */
        if (unlikely(__pyx_v_val1 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1089, __pyx_L1_error)
        }
        __pyx_t_31 = (((__pyx_v_val4 / __pyx_v_val1) >= 0.0) != 0);
        if (__pyx_t_31) {
        } else {
          __pyx_t_1 = __pyx_t_31;
          goto __pyx_L22_bool_binop_done;
        }
        if (unlikely(__pyx_v_val1 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1089, __pyx_L1_error)
        }
        __pyx_t_31 = (((__pyx_v_val4 / __pyx_v_val1) <= 1.0) != 0);
        __pyx_t_1 = __pyx_t_31;
        __pyx_L22_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1090
 *                 val4=(f10+f11*TAU)/f12
 *                 if val4/val1>=0.0 and val4/val1<=1.0: # t = val4/val1
 *                     g1,g2,g3=div(f10,f11,f12,f1,f2,f3) # t in TAU-style             # <<<<<<<<<<<<<<
 *                     #
 *                     #interval=line1a+t*(line1b-line1a)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_div(__pyx_v_f10, __pyx_v_f11, __pyx_v_f12, __pyx_v_f1, __pyx_v_f2, __pyx_v_f3, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1090, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1090, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1090, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1090, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_g1 = __pyx_t_24;
          __pyx_v_g2 = __pyx_t_25;
          __pyx_v_g3 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1095
 *                     #
 *                     # line1b-line1a
 *                     [h1,h2,h3]=sub(segment_2[0][0],segment_2[0][1],segment_2[0][2],segment_1[0][0],segment_1[0][1],segment_1[0][2])             # <<<<<<<<<<<<<<
 *                     [h4,h5,h6]=sub(segment_2[1][0],segment_2[1][1],segment_2[1][2],segment_1[1][0],segment_1[1][1],segment_1[1][2])
 *                     [h7,h8,h9]=sub(segment_2[2][0],segment_2[2][1],segment_2[2][2],segment_1[2][0],segment_1[2][1],segment_1[2][2])
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_39, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1095, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1095, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1095, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1095, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_h1 = __pyx_t_26;
          __pyx_v_h2 = __pyx_t_25;
          __pyx_v_h3 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1096
 *                     # line1b-line1a
 *                     [h1,h2,h3]=sub(segment_2[0][0],segment_2[0][1],segment_2[0][2],segment_1[0][0],segment_1[0][1],segment_1[0][2])
 *                     [h4,h5,h6]=sub(segment_2[1][0],segment_2[1][1],segment_2[1][2],segment_1[1][0],segment_1[1][1],segment_1[1][2])             # <<<<<<<<<<<<<<
 *                     [h7,h8,h9]=sub(segment_2[2][0],segment_2[2][1],segment_2[2][2],segment_1[2][0],segment_1[2][1],segment_1[2][2])
 *                     [h10,h11,h12]=sub(segment_2[3][0],segment_2[3][1],segment_2[3][2],segment_1[3][0],segment_1[3][1],segment_1[3][2])
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_39, __pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_35, __pyx_t_34, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1096, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1096, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1096, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_h4 = __pyx_t_24;
          __pyx_v_h5 = __pyx_t_25;
          __pyx_v_h6 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1097
 *                     [h1,h2,h3]=sub(segment_2[0][0],segment_2[0][1],segment_2[0][2],segment_1[0][0],segment_1[0][1],segment_1[0][2])
 *                     [h4,h5,h6]=sub(segment_2[1][0],segment_2[1][1],segment_2[1][2],segment_1[1][0],segment_1[1][1],segment_1[1][2])
 *                     [h7,h8,h9]=sub(segment_2[2][0],segment_2[2][1],segment_2[2][2],segment_1[2][0],segment_1[2][1],segment_1[2][2])             # <<<<<<<<<<<<<<
 *                     [h10,h11,h12]=sub(segment_2[3][0],segment_2[3][1],segment_2[3][2],segment_1[3][0],segment_1[3][1],segment_1[3][2])
 *                     [h13,h14,h15]=sub(segment_2[4][0],segment_2[4][1],segment_2[4][2],segment_1[4][0],segment_1[4][1],segment_1[4][2])
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_39, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1097, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1097, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1097, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_h7 = __pyx_t_26;
          __pyx_v_h8 = __pyx_t_25;
          __pyx_v_h9 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1098
 *                     [h4,h5,h6]=sub(segment_2[1][0],segment_2[1][1],segment_2[1][2],segment_1[1][0],segment_1[1][1],segment_1[1][2])
 *                     [h7,h8,h9]=sub(segment_2[2][0],segment_2[2][1],segment_2[2][2],segment_1[2][0],segment_1[2][1],segment_1[2][2])
 *                     [h10,h11,h12]=sub(segment_2[3][0],segment_2[3][1],segment_2[3][2],segment_1[3][0],segment_1[3][1],segment_1[3][2])             # <<<<<<<<<<<<<<
 *                     [h13,h14,h15]=sub(segment_2[4][0],segment_2[4][1],segment_2[4][2],segment_1[4][0],segment_1[4][1],segment_1[4][2])
 *                     [h16,h17,h18]=sub(segment_2[5][0],segment_2[5][1],segment_2[5][2],segment_1[5][0],segment_1[5][1],segment_1[5][2])
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_39, __pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_35, __pyx_t_34, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1098, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1098, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1098, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_h10 = __pyx_t_24;
          __pyx_v_h11 = __pyx_t_25;
          __pyx_v_h12 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1099
 *                     [h7,h8,h9]=sub(segment_2[2][0],segment_2[2][1],segment_2[2][2],segment_1[2][0],segment_1[2][1],segment_1[2][2])
 *                     [h10,h11,h12]=sub(segment_2[3][0],segment_2[3][1],segment_2[3][2],segment_1[3][0],segment_1[3][1],segment_1[3][2])
 *                     [h13,h14,h15]=sub(segment_2[4][0],segment_2[4][1],segment_2[4][2],segment_1[4][0],segment_1[4][1],segment_1[4][2])             # <<<<<<<<<<<<<<
 *                     [h16,h17,h18]=sub(segment_2[5][0],segment_2[5][1],segment_2[5][2],segment_1[5][0],segment_1[5][1],segment_1[5][2])
 *                     #
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_39, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1099, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1099, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1099, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_h13 = __pyx_t_26;
          __pyx_v_h14 = __pyx_t_25;
          __pyx_v_h15 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1100
 *                     [h10,h11,h12]=sub(segment_2[3][0],segment_2[3][1],segment_2[3][2],segment_1[3][0],segment_1[3][1],segment_1[3][2])
 *                     [h13,h14,h15]=sub(segment_2[4][0],segment_2[4][1],segment_2[4][2],segment_1[4][0],segment_1[4][1],segment_1[4][2])
 *                     [h16,h17,h18]=sub(segment_2[5][0],segment_2[5][1],segment_2[5][2],segment_1[5][0],segment_1[5][1],segment_1[5][2])             # <<<<<<<<<<<<<<
 *                     #
 *                     # line1a
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_39 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_39 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_35 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_35 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_27 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_27, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_34 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_34 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_39, __pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_35, __pyx_t_34, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1100, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1100, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1100, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_h16 = __pyx_t_24;
          __pyx_v_h17 = __pyx_t_25;
          __pyx_v_h18 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1103
 *                     #
 *                     # line1a
 *                     i1,i2,i3=segment_1[0][0],segment_1[0][1],segment_1[0][2]             # <<<<<<<<<<<<<<
 *                     i4,i5,i6=segment_1[1][0],segment_1[1][1],segment_1[1][2]
 *                     i7,i8,i9=segment_1[2][0],segment_1[2][1],segment_1[2][2]
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i1 = __pyx_t_26;
          __pyx_v_i2 = __pyx_t_25;
          __pyx_v_i3 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1104
 *                     # line1a
 *                     i1,i2,i3=segment_1[0][0],segment_1[0][1],segment_1[0][2]
 *                     i4,i5,i6=segment_1[1][0],segment_1[1][1],segment_1[1][2]             # <<<<<<<<<<<<<<
 *                     i7,i8,i9=segment_1[2][0],segment_1[2][1],segment_1[2][2]
 *                     i10,i11,i12=segment_1[3][0],segment_1[3][1],segment_1[3][2]
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_i4 = __pyx_t_24;
          __pyx_v_i5 = __pyx_t_25;
          __pyx_v_i6 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1105
 *                     i1,i2,i3=segment_1[0][0],segment_1[0][1],segment_1[0][2]
 *                     i4,i5,i6=segment_1[1][0],segment_1[1][1],segment_1[1][2]
 *                     i7,i8,i9=segment_1[2][0],segment_1[2][1],segment_1[2][2]             # <<<<<<<<<<<<<<
 *                     i10,i11,i12=segment_1[3][0],segment_1[3][1],segment_1[3][2]
 *                     i13,i14,i15=segment_1[4][0],segment_1[4][1],segment_1[4][2]
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i7 = __pyx_t_26;
          __pyx_v_i8 = __pyx_t_25;
          __pyx_v_i9 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1106
 *                     i4,i5,i6=segment_1[1][0],segment_1[1][1],segment_1[1][2]
 *                     i7,i8,i9=segment_1[2][0],segment_1[2][1],segment_1[2][2]
 *                     i10,i11,i12=segment_1[3][0],segment_1[3][1],segment_1[3][2]             # <<<<<<<<<<<<<<
 *                     i13,i14,i15=segment_1[4][0],segment_1[4][1],segment_1[4][2]
 *                     i16,i17,i18=segment_1[5][0],segment_1[5][1],segment_1[5][2]
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_i10 = __pyx_t_24;
          __pyx_v_i11 = __pyx_t_25;
          __pyx_v_i12 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1107
 *                     i7,i8,i9=segment_1[2][0],segment_1[2][1],segment_1[2][2]
 *                     i10,i11,i12=segment_1[3][0],segment_1[3][1],segment_1[3][2]
 *                     i13,i14,i15=segment_1[4][0],segment_1[4][1],segment_1[4][2]             # <<<<<<<<<<<<<<
 *                     i16,i17,i18=segment_1[5][0],segment_1[5][1],segment_1[5][2]
 *                     #
 */
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i13 = __pyx_t_26;
          __pyx_v_i14 = __pyx_t_25;
          __pyx_v_i15 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1108
 *                     i10,i11,i12=segment_1[3][0],segment_1[3][1],segment_1[3][2]
 *                     i13,i14,i15=segment_1[4][0],segment_1[4][1],segment_1[4][2]
 *                     i16,i17,i18=segment_1[5][0],segment_1[5][1],segment_1[5][2]             # <<<<<<<<<<<<<<
 *                     #
 *                     [j1,j2,j3]=mul(g1,g2,g3,h1,h2,h3)
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_i16 = __pyx_t_24;
          __pyx_v_i17 = __pyx_t_25;
          __pyx_v_i18 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1110
 *                     i16,i17,i18=segment_1[5][0],segment_1[5][1],segment_1[5][2]
 *                     #
 *                     [j1,j2,j3]=mul(g1,g2,g3,h1,h2,h3)             # <<<<<<<<<<<<<<
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)
 *                     #
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h1, __pyx_v_h2, __pyx_v_h3, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1110, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1110, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1110, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j1 = __pyx_t_26;
          __pyx_v_j2 = __pyx_t_25;
          __pyx_v_j3 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1111
 *                     #
 *                     [j1,j2,j3]=mul(g1,g2,g3,h1,h2,h3)
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j4,j5,j6]=mul(g1,g2,g3,h4,h5,h6)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j1, __pyx_v_j2, __pyx_v_j3, __pyx_v_i1, __pyx_v_i2, __pyx_v_i3, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1111, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1111, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1111, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j1 = __pyx_t_24;
          __pyx_v_j2 = __pyx_t_25;
          __pyx_v_j3 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1113
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)
 *                     #
 *                     [j4,j5,j6]=mul(g1,g2,g3,h4,h5,h6)             # <<<<<<<<<<<<<<
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)
 *                     #
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h4, __pyx_v_h5, __pyx_v_h6, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1113, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1113, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j4 = __pyx_t_26;
          __pyx_v_j5 = __pyx_t_25;
          __pyx_v_j6 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1114
 *                     #
 *                     [j4,j5,j6]=mul(g1,g2,g3,h4,h5,h6)
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j7,j8,j9]=mul(g1,g2,g3,h7,h8,h9)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j4, __pyx_v_j5, __pyx_v_j6, __pyx_v_i4, __pyx_v_i5, __pyx_v_i6, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1114, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1114, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1114, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1114, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1114, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j4 = __pyx_t_24;
          __pyx_v_j5 = __pyx_t_25;
          __pyx_v_j6 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1116
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)
 *                     #
 *                     [j7,j8,j9]=mul(g1,g2,g3,h7,h8,h9)             # <<<<<<<<<<<<<<
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)
 *                     #
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h7, __pyx_v_h8, __pyx_v_h9, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1116, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1116, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1116, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1116, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j7 = __pyx_t_26;
          __pyx_v_j8 = __pyx_t_25;
          __pyx_v_j9 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1117
 *                     #
 *                     [j7,j8,j9]=mul(g1,g2,g3,h7,h8,h9)
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j10,j11,j12]=mul(g1,g2,g3,h10,h11,h12)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j7, __pyx_v_j8, __pyx_v_j9, __pyx_v_i7, __pyx_v_i8, __pyx_v_i9, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1117, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1117, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1117, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1117, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j7 = __pyx_t_24;
          __pyx_v_j8 = __pyx_t_25;
          __pyx_v_j9 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1119
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)
 *                     #
 *                     [j10,j11,j12]=mul(g1,g2,g3,h10,h11,h12)             # <<<<<<<<<<<<<<
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)
 *                     #
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h10, __pyx_v_h11, __pyx_v_h12, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1119, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1119, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1119, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1119, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j10 = __pyx_t_26;
          __pyx_v_j11 = __pyx_t_25;
          __pyx_v_j12 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1120
 *                     #
 *                     [j10,j11,j12]=mul(g1,g2,g3,h10,h11,h12)
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j13,j14,j15]=mul(g1,g2,g3,h13,h14,h15)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j10, __pyx_v_j11, __pyx_v_j12, __pyx_v_i10, __pyx_v_i11, __pyx_v_i12, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1120, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1120, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1120, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j10 = __pyx_t_24;
          __pyx_v_j11 = __pyx_t_25;
          __pyx_v_j12 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1122
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)
 *                     #
 *                     [j13,j14,j15]=mul(g1,g2,g3,h13,h14,h15)             # <<<<<<<<<<<<<<
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)
 *                     #
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h13, __pyx_v_h14, __pyx_v_h15, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1122, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1122, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1122, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j13 = __pyx_t_26;
          __pyx_v_j14 = __pyx_t_25;
          __pyx_v_j15 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1123
 *                     #
 *                     [j13,j14,j15]=mul(g1,g2,g3,h13,h14,h15)
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j16,j17,j18]=mul(g1,g2,g3,h16,h17,h18)
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j13, __pyx_v_j14, __pyx_v_j15, __pyx_v_i13, __pyx_v_i14, __pyx_v_i15, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1123, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1123, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1123, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1123, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1123, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j13 = __pyx_t_24;
          __pyx_v_j14 = __pyx_t_25;
          __pyx_v_j15 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1125
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)
 *                     #
 *                     [j16,j17,j18]=mul(g1,g2,g3,h16,h17,h18)             # <<<<<<<<<<<<<<
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)
 * 
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_g1, __pyx_v_g2, __pyx_v_g3, __pyx_v_h16, __pyx_v_h17, __pyx_v_h18, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1125, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1125, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_27 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_27);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_27 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1125, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1125, __pyx_L1_error)
          }
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_v_j16 = __pyx_t_26;
          __pyx_v_j17 = __pyx_t_25;
          __pyx_v_j18 = __pyx_t_24;

          /* "pyqcstrc/icosah/intsct.pyx":1126
 *                     #
 *                     [j16,j17,j18]=mul(g1,g2,g3,h16,h17,h18)
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)             # <<<<<<<<<<<<<<
 * 
 *                     tmp1=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])
 */
          __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j16, __pyx_v_j17, __pyx_v_j18, __pyx_v_i16, __pyx_v_i17, __pyx_v_i18, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (likely(__pyx_t_8 != Py_None)) {
            PyObject* sequence = __pyx_t_8;
            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(0, 1126, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_27);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1126, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_27);
            __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1126, __pyx_L1_error)
          }
          __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
          __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_j16 = __pyx_t_24;
          __pyx_v_j17 = __pyx_t_25;
          __pyx_v_j18 = __pyx_t_26;

          /* "pyqcstrc/icosah/intsct.pyx":1128
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)
 * 
 *                     tmp1=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_j1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_j2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_j3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_j4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_j5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_j6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_40 = __Pyx_PyInt_From_long(__pyx_v_j7); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_40);
          __pyx_t_41 = __Pyx_PyInt_From_long(__pyx_v_j8); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_41);
          __pyx_t_42 = __Pyx_PyInt_From_long(__pyx_v_j9); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_42);
          __pyx_t_43 = __Pyx_PyInt_From_long(__pyx_v_j10); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_43);
          __pyx_t_44 = __Pyx_PyInt_From_long(__pyx_v_j11); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_44);
          __pyx_t_45 = __Pyx_PyInt_From_long(__pyx_v_j12); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_45);
          __pyx_t_46 = __Pyx_PyInt_From_long(__pyx_v_j13); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_46);
          __pyx_t_47 = __Pyx_PyInt_From_long(__pyx_v_j14); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_47);
          __pyx_t_48 = __Pyx_PyInt_From_long(__pyx_v_j15); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_48);
          __pyx_t_49 = __Pyx_PyInt_From_long(__pyx_v_j16); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_49);
          __pyx_t_50 = __Pyx_PyInt_From_long(__pyx_v_j17); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_50);
          __pyx_t_51 = __Pyx_PyInt_From_long(__pyx_v_j18); if (unlikely(!__pyx_t_51)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_51);
          __pyx_t_52 = PyList_New(18); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_52);
          __Pyx_GIVEREF(__pyx_t_4);
          PyList_SET_ITEM(__pyx_t_52, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_27);
          PyList_SET_ITEM(__pyx_t_52, 1, __pyx_t_27);
          __Pyx_GIVEREF(__pyx_t_5);
          PyList_SET_ITEM(__pyx_t_52, 2, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_52, 3, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_6);
          PyList_SET_ITEM(__pyx_t_52, 4, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_3);
          PyList_SET_ITEM(__pyx_t_52, 5, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_40);
          PyList_SET_ITEM(__pyx_t_52, 6, __pyx_t_40);
          __Pyx_GIVEREF(__pyx_t_41);
          PyList_SET_ITEM(__pyx_t_52, 7, __pyx_t_41);
          __Pyx_GIVEREF(__pyx_t_42);
          PyList_SET_ITEM(__pyx_t_52, 8, __pyx_t_42);
          __Pyx_GIVEREF(__pyx_t_43);
          PyList_SET_ITEM(__pyx_t_52, 9, __pyx_t_43);
          __Pyx_GIVEREF(__pyx_t_44);
          PyList_SET_ITEM(__pyx_t_52, 10, __pyx_t_44);
          __Pyx_GIVEREF(__pyx_t_45);
          PyList_SET_ITEM(__pyx_t_52, 11, __pyx_t_45);
          __Pyx_GIVEREF(__pyx_t_46);
          PyList_SET_ITEM(__pyx_t_52, 12, __pyx_t_46);
          __Pyx_GIVEREF(__pyx_t_47);
          PyList_SET_ITEM(__pyx_t_52, 13, __pyx_t_47);
          __Pyx_GIVEREF(__pyx_t_48);
          PyList_SET_ITEM(__pyx_t_52, 14, __pyx_t_48);
          __Pyx_GIVEREF(__pyx_t_49);
          PyList_SET_ITEM(__pyx_t_52, 15, __pyx_t_49);
          __Pyx_GIVEREF(__pyx_t_50);
          PyList_SET_ITEM(__pyx_t_52, 16, __pyx_t_50);
          __Pyx_GIVEREF(__pyx_t_51);
          PyList_SET_ITEM(__pyx_t_52, 17, __pyx_t_51);
          __pyx_t_4 = 0;
          __pyx_t_27 = 0;
          __pyx_t_5 = 0;
          __pyx_t_2 = 0;
          __pyx_t_6 = 0;
          __pyx_t_3 = 0;
          __pyx_t_40 = 0;
          __pyx_t_41 = 0;
          __pyx_t_42 = 0;
          __pyx_t_43 = 0;
          __pyx_t_44 = 0;
          __pyx_t_45 = 0;
          __pyx_t_46 = 0;
          __pyx_t_47 = 0;
          __pyx_t_48 = 0;
          __pyx_t_49 = 0;
          __pyx_t_50 = 0;
          __pyx_t_51 = 0;
          __pyx_t_51 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_51 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_51)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_51);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          __pyx_t_8 = (__pyx_t_51) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_51, __pyx_t_52) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_52);
          __Pyx_XDECREF(__pyx_t_51); __pyx_t_51 = 0;
          __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1128, __pyx_L1_error)
          __pyx_t_29 = ((PyArrayObject *)__pyx_t_8);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
              }
              __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
            }
            __pyx_pybuffernd_tmp1.diminfo[0].strides = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1.diminfo[0].shape = __pyx_pybuffernd_tmp1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1128, __pyx_L1_error)
          }
          __pyx_t_29 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_8));
          __pyx_t_8 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1089
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 *                 val4=(f10+f11*TAU)/f12
 *                 if val4/val1>=0.0 and val4/val1<=1.0: # t = val4/val1             # <<<<<<<<<<<<<<
 *                     g1,g2,g3=div(f10,f11,f12,f1,f2,f3) # t in TAU-style
 *                     #
 */
          goto __pyx_L21;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1130
 *                     tmp1=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
        }
        __pyx_L21:;

        /* "pyqcstrc/icosah/intsct.pyx":1086
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)
 *             val3=(f7+f8*TAU)/f9
 *             if val3/val1>=0.0 and (val2+val3)/val1<=1.0:             # <<<<<<<<<<<<<<
 *                 f10,f11,f12=det_matrix(vecCD,vecCE,vecCA)
 *                 val4=(f10+f11*TAU)/f12
 */
        goto __pyx_L18;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1132
 *                     pass
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L18:;

      /* "pyqcstrc/icosah/intsct.pyx":1083
 *         #   t = val4/val1:
 *         #  g1,g2,g3 = div(f10,f11,f12,f1,f2,f3)
 *         if val2/val1>=0.0 and val2/val1<=1.0:             # <<<<<<<<<<<<<<
 *             f7,f8,f9=det_matrix(vecCD,vecCA,vecBA)
 *             val3=(f7+f8*TAU)/f9
 */
      goto __pyx_L15;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1134
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp1
 * 
 */
    /*else*/ {
    }
    __pyx_L15:;

    /* "pyqcstrc/icosah/intsct.pyx":1135
 *         else:
 *             pass
 *         return tmp1             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp1);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":941
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray intersection_segment_surface(np.ndarray[DTYPE_int_t, ndim=2] segment_1,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=2] segment_2,
 *                                                 np.ndarray[DTYPE_int_t, ndim=2] surface_1,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_40);
  __Pyx_XDECREF(__pyx_t_41);
  __Pyx_XDECREF(__pyx_t_42);
  __Pyx_XDECREF(__pyx_t_43);
  __Pyx_XDECREF(__pyx_t_44);
  __Pyx_XDECREF(__pyx_t_45);
  __Pyx_XDECREF(__pyx_t_46);
  __Pyx_XDECREF(__pyx_t_47);
  __Pyx_XDECREF(__pyx_t_48);
  __Pyx_XDECREF(__pyx_t_49);
  __Pyx_XDECREF(__pyx_t_50);
  __Pyx_XDECREF(__pyx_t_51);
  __Pyx_XDECREF(__pyx_t_52);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecBA.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCA.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCD.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCE.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_segment_surface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1i3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2i3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur1i3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur2i3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sur3i3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecBA.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCA.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCD.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vecCE.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1i1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1i2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1i3);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2i1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2i2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2i3);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur1i1);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur1i2);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur1i3);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur2i1);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur2i2);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur2i3);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur3i1);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur3i2);
  __Pyx_XDECREF((PyObject *)__pyx_v_sur3i3);
  __Pyx_XDECREF((PyObject *)__pyx_v_vecBA);
  __Pyx_XDECREF((PyObject *)__pyx_v_vecCD);
  __Pyx_XDECREF((PyObject *)__pyx_v_vecCE);
  __Pyx_XDECREF((PyObject *)__pyx_v_vecCA);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1139
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray intersection_two_segment(np.ndarray[DTYPE_int_t, ndim=2] segment_1_A,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=2] segment_1_B,
 *                                         np.ndarray[DTYPE_int_t, ndim=2] segment_2_C,
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_segment(PyArrayObject *__pyx_v_segment_1_A, PyArrayObject *__pyx_v_segment_1_B, PyArrayObject *__pyx_v_segment_2_C, PyArrayObject *__pyx_v_segment_2_D, int __pyx_v_verbose) {
  double __pyx_v_s;
  double __pyx_v_t;
  long __pyx_v_ax1;
  long __pyx_v_ax2;
  long __pyx_v_ax3;
  long __pyx_v_ay1;
  long __pyx_v_ay2;
  long __pyx_v_ay3;
  long __pyx_v_az1;
  long __pyx_v_az2;
  long __pyx_v_az3;
  long __pyx_v_bx1;
  long __pyx_v_bx2;
  long __pyx_v_bx3;
  long __pyx_v_by1;
  long __pyx_v_by2;
  long __pyx_v_by3;
  long __pyx_v_bz1;
  long __pyx_v_bz2;
  long __pyx_v_bz3;
  long __pyx_v_cx1;
  long __pyx_v_cx2;
  long __pyx_v_cx3;
  long __pyx_v_cy1;
  long __pyx_v_cy2;
  long __pyx_v_cy3;
  long __pyx_v_cz1;
  long __pyx_v_cz2;
  long __pyx_v_cz3;
  long __pyx_v_a1;
  long __pyx_v_a2;
  long __pyx_v_a3;
  long __pyx_v_b1;
  long __pyx_v_b2;
  long __pyx_v_b3;
  long __pyx_v_c1;
  long __pyx_v_c2;
  long __pyx_v_c3;
  long __pyx_v_d1;
  long __pyx_v_d2;
  long __pyx_v_d3;
  long __pyx_v_e1;
  long __pyx_v_e2;
  long __pyx_v_e3;
  long __pyx_v_f1;
  long __pyx_v_f2;
  long __pyx_v_f3;
  long __pyx_v_g1;
  long __pyx_v_g2;
  long __pyx_v_g3;
  long __pyx_v_m1;
  long __pyx_v_m2;
  long __pyx_v_m3;
  long __pyx_v_n1;
  long __pyx_v_n2;
  long __pyx_v_n3;
  long __pyx_v_o1;
  long __pyx_v_o2;
  long __pyx_v_o3;
  long __pyx_v_p1;
  long __pyx_v_p2;
  long __pyx_v_p3;
  long __pyx_v_z1;
  long __pyx_v_z2;
  long __pyx_v_z3;
  long __pyx_v_ddx1;
  long __pyx_v_ddx2;
  long __pyx_v_ddx3;
  long __pyx_v_h1;
  long __pyx_v_h2;
  long __pyx_v_h3;
  long __pyx_v_h4;
  long __pyx_v_h5;
  long __pyx_v_h6;
  long __pyx_v_h7;
  long __pyx_v_h8;
  long __pyx_v_h9;
  long __pyx_v_h10;
  long __pyx_v_h11;
  long __pyx_v_h12;
  long __pyx_v_h13;
  long __pyx_v_h14;
  long __pyx_v_h15;
  long __pyx_v_h16;
  long __pyx_v_h17;
  long __pyx_v_h18;
  long __pyx_v_i1;
  long __pyx_v_i2;
  long __pyx_v_i3;
  long __pyx_v_i4;
  long __pyx_v_i5;
  long __pyx_v_i6;
  long __pyx_v_i7;
  long __pyx_v_i8;
  long __pyx_v_i9;
  long __pyx_v_i10;
  long __pyx_v_i11;
  long __pyx_v_i12;
  long __pyx_v_i13;
  long __pyx_v_i14;
  long __pyx_v_i15;
  long __pyx_v_i16;
  long __pyx_v_i17;
  long __pyx_v_i18;
  long __pyx_v_j1;
  long __pyx_v_j2;
  long __pyx_v_j3;
  long __pyx_v_j4;
  long __pyx_v_j5;
  long __pyx_v_j6;
  long __pyx_v_j7;
  long __pyx_v_j8;
  long __pyx_v_j9;
  long __pyx_v_j10;
  long __pyx_v_j11;
  long __pyx_v_j12;
  long __pyx_v_j13;
  long __pyx_v_j14;
  long __pyx_v_j15;
  long __pyx_v_j16;
  long __pyx_v_j17;
  long __pyx_v_j18;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_seg1ai1 = 0;
  PyArrayObject *__pyx_v_seg1ai2 = 0;
  PyArrayObject *__pyx_v_seg1ai3 = 0;
  PyArrayObject *__pyx_v_seg1bi1 = 0;
  PyArrayObject *__pyx_v_seg1bi2 = 0;
  PyArrayObject *__pyx_v_seg1bi3 = 0;
  PyArrayObject *__pyx_v_seg2ci1 = 0;
  PyArrayObject *__pyx_v_seg2ci2 = 0;
  PyArrayObject *__pyx_v_seg2ci3 = 0;
  PyArrayObject *__pyx_v_seg2di1 = 0;
  PyArrayObject *__pyx_v_seg2di2 = 0;
  PyArrayObject *__pyx_v_seg2di3 = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_s1 = NULL;
  PyObject *__pyx_v_s2 = NULL;
  PyObject *__pyx_v_s3 = NULL;
  PyObject *__pyx_v_t1 = NULL;
  PyObject *__pyx_v_t2 = NULL;
  PyObject *__pyx_v_t3 = NULL;
  PyObject *__pyx_v_ddy1 = NULL;
  PyObject *__pyx_v_ddy2 = NULL;
  PyObject *__pyx_v_ddy3 = NULL;
  PyObject *__pyx_v_ddz1 = NULL;
  PyObject *__pyx_v_ddz2 = NULL;
  PyObject *__pyx_v_ddz3 = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1ai1;
  __Pyx_Buffer __pyx_pybuffer_seg1ai1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1ai2;
  __Pyx_Buffer __pyx_pybuffer_seg1ai2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1ai3;
  __Pyx_Buffer __pyx_pybuffer_seg1ai3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1bi1;
  __Pyx_Buffer __pyx_pybuffer_seg1bi1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1bi2;
  __Pyx_Buffer __pyx_pybuffer_seg1bi2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg1bi3;
  __Pyx_Buffer __pyx_pybuffer_seg1bi3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2ci1;
  __Pyx_Buffer __pyx_pybuffer_seg2ci1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2ci2;
  __Pyx_Buffer __pyx_pybuffer_seg2ci2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2ci3;
  __Pyx_Buffer __pyx_pybuffer_seg2ci3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2di1;
  __Pyx_Buffer __pyx_pybuffer_seg2di1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2di2;
  __Pyx_Buffer __pyx_pybuffer_seg2di2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seg2di3;
  __Pyx_Buffer __pyx_pybuffer_seg2di3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_1_A;
  __Pyx_Buffer __pyx_pybuffer_segment_1_A;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_1_B;
  __Pyx_Buffer __pyx_pybuffer_segment_1_B;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_2_C;
  __Pyx_Buffer __pyx_pybuffer_segment_2_C;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_segment_2_D;
  __Pyx_Buffer __pyx_pybuffer_segment_2_D;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyArrayObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  long __pyx_t_21;
  long __pyx_t_22;
  long __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyArrayObject *__pyx_t_28 = NULL;
  int __pyx_t_29;
  double __pyx_t_30;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_31;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_32;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_UCS4 __pyx_t_35;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_36;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_37;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_38;
  PyObject *__pyx_t_39 = NULL;
  PyObject *__pyx_t_40 = NULL;
  PyObject *__pyx_t_41 = NULL;
  PyObject *__pyx_t_42 = NULL;
  PyObject *__pyx_t_43 = NULL;
  PyObject *__pyx_t_44 = NULL;
  PyObject *__pyx_t_45 = NULL;
  PyObject *__pyx_t_46 = NULL;
  PyObject *__pyx_t_47 = NULL;
  PyObject *__pyx_t_48 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection_two_segment", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_seg1ai1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1ai1.refcount = 0;
  __pyx_pybuffernd_seg1ai1.data = NULL;
  __pyx_pybuffernd_seg1ai1.rcbuffer = &__pyx_pybuffer_seg1ai1;
  __pyx_pybuffer_seg1ai2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1ai2.refcount = 0;
  __pyx_pybuffernd_seg1ai2.data = NULL;
  __pyx_pybuffernd_seg1ai2.rcbuffer = &__pyx_pybuffer_seg1ai2;
  __pyx_pybuffer_seg1ai3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1ai3.refcount = 0;
  __pyx_pybuffernd_seg1ai3.data = NULL;
  __pyx_pybuffernd_seg1ai3.rcbuffer = &__pyx_pybuffer_seg1ai3;
  __pyx_pybuffer_seg1bi1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1bi1.refcount = 0;
  __pyx_pybuffernd_seg1bi1.data = NULL;
  __pyx_pybuffernd_seg1bi1.rcbuffer = &__pyx_pybuffer_seg1bi1;
  __pyx_pybuffer_seg1bi2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1bi2.refcount = 0;
  __pyx_pybuffernd_seg1bi2.data = NULL;
  __pyx_pybuffernd_seg1bi2.rcbuffer = &__pyx_pybuffer_seg1bi2;
  __pyx_pybuffer_seg1bi3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg1bi3.refcount = 0;
  __pyx_pybuffernd_seg1bi3.data = NULL;
  __pyx_pybuffernd_seg1bi3.rcbuffer = &__pyx_pybuffer_seg1bi3;
  __pyx_pybuffer_seg2ci1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2ci1.refcount = 0;
  __pyx_pybuffernd_seg2ci1.data = NULL;
  __pyx_pybuffernd_seg2ci1.rcbuffer = &__pyx_pybuffer_seg2ci1;
  __pyx_pybuffer_seg2ci2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2ci2.refcount = 0;
  __pyx_pybuffernd_seg2ci2.data = NULL;
  __pyx_pybuffernd_seg2ci2.rcbuffer = &__pyx_pybuffer_seg2ci2;
  __pyx_pybuffer_seg2ci3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2ci3.refcount = 0;
  __pyx_pybuffernd_seg2ci3.data = NULL;
  __pyx_pybuffernd_seg2ci3.rcbuffer = &__pyx_pybuffer_seg2ci3;
  __pyx_pybuffer_seg2di1.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2di1.refcount = 0;
  __pyx_pybuffernd_seg2di1.data = NULL;
  __pyx_pybuffernd_seg2di1.rcbuffer = &__pyx_pybuffer_seg2di1;
  __pyx_pybuffer_seg2di2.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2di2.refcount = 0;
  __pyx_pybuffernd_seg2di2.data = NULL;
  __pyx_pybuffernd_seg2di2.rcbuffer = &__pyx_pybuffer_seg2di2;
  __pyx_pybuffer_seg2di3.pybuffer.buf = NULL;
  __pyx_pybuffer_seg2di3.refcount = 0;
  __pyx_pybuffernd_seg2di3.data = NULL;
  __pyx_pybuffernd_seg2di3.rcbuffer = &__pyx_pybuffer_seg2di3;
  __pyx_pybuffer_segment_1_A.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_1_A.refcount = 0;
  __pyx_pybuffernd_segment_1_A.data = NULL;
  __pyx_pybuffernd_segment_1_A.rcbuffer = &__pyx_pybuffer_segment_1_A;
  __pyx_pybuffer_segment_1_B.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_1_B.refcount = 0;
  __pyx_pybuffernd_segment_1_B.data = NULL;
  __pyx_pybuffernd_segment_1_B.rcbuffer = &__pyx_pybuffer_segment_1_B;
  __pyx_pybuffer_segment_2_C.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_2_C.refcount = 0;
  __pyx_pybuffernd_segment_2_C.data = NULL;
  __pyx_pybuffernd_segment_2_C.rcbuffer = &__pyx_pybuffer_segment_2_C;
  __pyx_pybuffer_segment_2_D.pybuffer.buf = NULL;
  __pyx_pybuffer_segment_2_D.refcount = 0;
  __pyx_pybuffernd_segment_2_D.data = NULL;
  __pyx_pybuffernd_segment_2_D.rcbuffer = &__pyx_pybuffer_segment_2_D;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_1_A, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_1_A.diminfo[0].strides = __pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_1_A.diminfo[0].shape = __pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_1_A.diminfo[1].strides = __pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_1_A.diminfo[1].shape = __pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_1_B, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_1_B.diminfo[0].strides = __pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_1_B.diminfo[0].shape = __pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_1_B.diminfo[1].strides = __pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_1_B.diminfo[1].shape = __pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_2_C, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_2_C.diminfo[0].strides = __pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_2_C.diminfo[0].shape = __pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_2_C.diminfo[1].strides = __pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_2_C.diminfo[1].shape = __pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer, (PyObject*)__pyx_v_segment_2_D, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  }
  __pyx_pybuffernd_segment_2_D.diminfo[0].strides = __pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_segment_2_D.diminfo[0].shape = __pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_segment_2_D.diminfo[1].strides = __pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_segment_2_D.diminfo[1].shape = __pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1162
 *     #verbose=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           intersection_two_segment()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1163
 * 
 *     if verbose>0:
 *         print('           intersection_two_segment()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1162
 *     #verbose=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           intersection_two_segment()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1165
 *         print('           intersection_two_segment()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if verbose>1:
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":1167
 *         pass
 * 
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('           segment_1',segment_1_A)
 *         print('           segment_1',segment_1_B)
 */
  __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1168
 * 
 *     if verbose>1:
 *         print('           segment_1',segment_1_A)             # <<<<<<<<<<<<<<
 *         print('           segment_1',segment_1_B)
 *         print('           segment_2',segment_2_C)
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_kp_u_segment_1);
    __Pyx_GIVEREF(__pyx_kp_u_segment_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_segment_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_segment_1_A));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_segment_1_A));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_segment_1_A));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1169
 *     if verbose>1:
 *         print('           segment_1',segment_1_A)
 *         print('           segment_1',segment_1_B)             # <<<<<<<<<<<<<<
 *         print('           segment_2',segment_2_C)
 *         print('           segment_2',segment_2_D)
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_kp_u_segment_1);
    __Pyx_GIVEREF(__pyx_kp_u_segment_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_segment_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_segment_1_B));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_segment_1_B));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_segment_1_B));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1170
 *         print('           segment_1',segment_1_A)
 *         print('           segment_1',segment_1_B)
 *         print('           segment_2',segment_2_C)             # <<<<<<<<<<<<<<
 *         print('           segment_2',segment_2_D)
 *     else:
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_kp_u_segment_2);
    __Pyx_GIVEREF(__pyx_kp_u_segment_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_segment_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_segment_2_C));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_segment_2_C));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_segment_2_C));
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1171
 *         print('           segment_1',segment_1_B)
 *         print('           segment_2',segment_2_C)
 *         print('           segment_2',segment_2_D)             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_kp_u_segment_2);
    __Pyx_GIVEREF(__pyx_kp_u_segment_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_segment_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_segment_2_D));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_segment_2_D));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_segment_2_D));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1167
 *         pass
 * 
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         print('           segment_1',segment_1_A)
 *         print('           segment_1',segment_1_B)
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1173
 *         print('           segment_2',segment_2_D)
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #tmp1a,tmp1b,tmp1c,seg1ai1,seg1ai2,seg1ai3=projection(segment_1_A[0],segment_1_A[1],segment_1_A[2],segment_1_A[3],segment_1_A[4],segment_1_A[5])
 *     #tmp1a,tmp1b,tmp1c,seg1bi1,seg1bi2,seg1bi3=projection(segment_1_B[0],segment_1_B[1],segment_1_B[2],segment_1_B[3],segment_1_B[4],segment_1_B[5])
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/intsct.pyx":1179
 *     #tmp1a,tmp1b,tmp1c,seg2di1,seg2di2,seg2di3=projection(segment_2_D[0],segment_2_D[1],segment_2_D[2],segment_2_D[3],segment_2_D[4],segment_2_D[5])
 * 
 *     _,_,_,seg1ai1,seg1ai2,seg1ai3=projection(segment_1_A[0],segment_1_A[1],segment_1_A[2],segment_1_A[3],segment_1_A[4],segment_1_A[5])             # <<<<<<<<<<<<<<
 *     _,_,_,seg1bi1,seg1bi2,seg1bi3=projection(segment_1_B[0],segment_1_B[1],segment_1_B[2],segment_1_B[3],segment_1_B[4],segment_1_B[5])
 *     _,_,_,seg2ci1,seg2ci2,seg2ci3=projection(segment_2_C[0],segment_2_C[1],segment_2_C[2],segment_2_C[3],segment_2_C[4],segment_2_C[5])
 */
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_t_8 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __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_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (likely(__pyx_t_8 != Py_None)) {
    PyObject* sequence = __pyx_t_8;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1179, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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_t_4 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_7,&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1179, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1179, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_v__ = __pyx_t_7;
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1ai1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg1ai1.diminfo[0].strides = __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1ai1.diminfo[0].shape = __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1ai1 = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1ai2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg1ai2.diminfo[0].strides = __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1ai2.diminfo[0].shape = __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1ai2 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1ai3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg1ai3.diminfo[0].strides = __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1ai3.diminfo[0].shape = __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1ai3 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1180
 * 
 *     _,_,_,seg1ai1,seg1ai2,seg1ai3=projection(segment_1_A[0],segment_1_A[1],segment_1_A[2],segment_1_A[3],segment_1_A[4],segment_1_A[5])
 *     _,_,_,seg1bi1,seg1bi2,seg1bi3=projection(segment_1_B[0],segment_1_B[1],segment_1_B[2],segment_1_B[3],segment_1_B[4],segment_1_B[5])             # <<<<<<<<<<<<<<
 *     _,_,_,seg2ci1,seg2ci2,seg2ci3=projection(segment_2_C[0],segment_2_C[1],segment_2_C[2],segment_2_C[3],segment_2_C[4],segment_2_C[5])
 *     _,_,_,seg2di1,seg2di2,seg2di3=projection(segment_2_D[0],segment_2_D[1],segment_2_D[2],segment_2_D[3],segment_2_D[4],segment_2_D[5])
 */
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(__pyx_t_7 != Py_None)) {
    PyObject* sequence = __pyx_t_7;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1180, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1180, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1bi1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg1bi1.diminfo[0].strides = __pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1bi1.diminfo[0].shape = __pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1bi1 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1bi2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg1bi2.diminfo[0].strides = __pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1bi2.diminfo[0].shape = __pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1bi2 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg1bi3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg1bi3.diminfo[0].strides = __pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg1bi3.diminfo[0].shape = __pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_seg1bi3 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1181
 *     _,_,_,seg1ai1,seg1ai2,seg1ai3=projection(segment_1_A[0],segment_1_A[1],segment_1_A[2],segment_1_A[3],segment_1_A[4],segment_1_A[5])
 *     _,_,_,seg1bi1,seg1bi2,seg1bi3=projection(segment_1_B[0],segment_1_B[1],segment_1_B[2],segment_1_B[3],segment_1_B[4],segment_1_B[5])
 *     _,_,_,seg2ci1,seg2ci2,seg2ci3=projection(segment_2_C[0],segment_2_C[1],segment_2_C[2],segment_2_C[3],segment_2_C[4],segment_2_C[5])             # <<<<<<<<<<<<<<
 *     _,_,_,seg2di1,seg2di2,seg2di3=projection(segment_2_D[0],segment_2_D[1],segment_2_D[2],segment_2_D[3],segment_2_D[4],segment_2_D[5])
 * 
 */
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_C), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_t_6 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(__pyx_t_6 != Py_None)) {
    PyObject* sequence = __pyx_t_6;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1181, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8,&__pyx_t_7};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1181, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1181, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2ci1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg2ci1.diminfo[0].strides = __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2ci1.diminfo[0].shape = __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2ci1 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2ci2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg2ci2.diminfo[0].strides = __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2ci2.diminfo[0].shape = __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2ci2 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2ci3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg2ci3.diminfo[0].strides = __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2ci3.diminfo[0].shape = __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2ci3 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1182
 *     _,_,_,seg1bi1,seg1bi2,seg1bi3=projection(segment_1_B[0],segment_1_B[1],segment_1_B[2],segment_1_B[3],segment_1_B[4],segment_1_B[5])
 *     _,_,_,seg2ci1,seg2ci2,seg2ci3=projection(segment_2_C[0],segment_2_C[1],segment_2_C[2],segment_2_C[3],segment_2_C[4],segment_2_C[5])
 *     _,_,_,seg2di1,seg2di2,seg2di3=projection(segment_2_D[0],segment_2_D[1],segment_2_D[2],segment_2_D[3],segment_2_D[4],segment_2_D[5])             # <<<<<<<<<<<<<<
 * 
 *     # vec AB
 */
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_2_D), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1182, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_8,&__pyx_t_7,&__pyx_t_6};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1182, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di1.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di1.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di1.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2di1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg2di1.diminfo[0].strides = __pyx_pybuffernd_seg2di1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2di1.diminfo[0].shape = __pyx_pybuffernd_seg2di1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2di1 = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di2.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di2.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di2.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2di2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_seg2di2.diminfo[0].strides = __pyx_pybuffernd_seg2di2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2di2.diminfo[0].shape = __pyx_pybuffernd_seg2di2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2di2 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di3.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di3.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seg2di3.rcbuffer->pybuffer, (PyObject*)__pyx_v_seg2di3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
      __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
    }
    __pyx_pybuffernd_seg2di3.diminfo[0].strides = __pyx_pybuffernd_seg2di3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seg2di3.diminfo[0].shape = __pyx_pybuffernd_seg2di3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_seg2di3 = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1185
 * 
 *     # vec AB
 *     [ax1,ax2,ax3]=sub(seg1bi1[0],seg1bi1[1],seg1bi1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])             # <<<<<<<<<<<<<<
 *     [ay1,ay2,ay3]=sub(seg1bi2[0],seg1bi2[1],seg1bi2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])
 *     [az1,az2,az3]=sub(seg1bi3[0],seg1bi3[1],seg1bi3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])
 */
  __pyx_t_15 = 0;
  __pyx_t_16 = 1;
  __pyx_t_17 = 2;
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg1bi1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg1bi1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg1bi1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1185, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1185, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_ax1 = __pyx_t_21;
  __pyx_v_ax2 = __pyx_t_22;
  __pyx_v_ax3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1186
 *     # vec AB
 *     [ax1,ax2,ax3]=sub(seg1bi1[0],seg1bi1[1],seg1bi1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])
 *     [ay1,ay2,ay3]=sub(seg1bi2[0],seg1bi2[1],seg1bi2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])             # <<<<<<<<<<<<<<
 *     [az1,az2,az3]=sub(seg1bi3[0],seg1bi3[1],seg1bi3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])
 * 
 */
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_17 = 0;
  __pyx_t_16 = 1;
  __pyx_t_15 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1bi2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1bi2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1bi2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1186, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1186, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_ay1 = __pyx_t_23;
  __pyx_v_ay2 = __pyx_t_22;
  __pyx_v_ay3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1187
 *     [ax1,ax2,ax3]=sub(seg1bi1[0],seg1bi1[1],seg1bi1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])
 *     [ay1,ay2,ay3]=sub(seg1bi2[0],seg1bi2[1],seg1bi2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])
 *     [az1,az2,az3]=sub(seg1bi3[0],seg1bi3[1],seg1bi3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])             # <<<<<<<<<<<<<<
 * 
 *     # vec AC
 */
  __pyx_t_15 = 0;
  __pyx_t_16 = 1;
  __pyx_t_17 = 2;
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg1bi3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg1bi3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg1bi3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1187, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1187, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_az1 = __pyx_t_21;
  __pyx_v_az2 = __pyx_t_22;
  __pyx_v_az3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1190
 * 
 *     # vec AC
 *     [bx1,bx2,bx3]=sub(seg2ci1[0],seg2ci1[1],seg2ci1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])             # <<<<<<<<<<<<<<
 *     [by1,by2,by3]=sub(seg2ci2[0],seg2ci2[1],seg2ci2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])
 *     [bz1,bz2,bz3]=sub(seg2ci3[0],seg2ci3[1],seg2ci3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])
 */
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_17 = 0;
  __pyx_t_16 = 1;
  __pyx_t_15 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg1ai1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1190, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1190, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_bx1 = __pyx_t_23;
  __pyx_v_bx2 = __pyx_t_22;
  __pyx_v_bx3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1191
 *     # vec AC
 *     [bx1,bx2,bx3]=sub(seg2ci1[0],seg2ci1[1],seg2ci1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])
 *     [by1,by2,by3]=sub(seg2ci2[0],seg2ci2[1],seg2ci2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])             # <<<<<<<<<<<<<<
 *     [bz1,bz2,bz3]=sub(seg2ci3[0],seg2ci3[1],seg2ci3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_16 = 1;
  __pyx_t_17 = 2;
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg1ai2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1191, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1191, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_by1 = __pyx_t_21;
  __pyx_v_by2 = __pyx_t_22;
  __pyx_v_by3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1192
 *     [bx1,bx2,bx3]=sub(seg2ci1[0],seg2ci1[1],seg2ci1[2],seg1ai1[0],seg1ai1[1],seg1ai1[2])
 *     [by1,by2,by3]=sub(seg2ci2[0],seg2ci2[1],seg2ci2[2],seg1ai2[0],seg1ai2[1],seg1ai2[2])
 *     [bz1,bz2,bz3]=sub(seg2ci3[0],seg2ci3[1],seg2ci3[2],seg1ai3[0],seg1ai3[1],seg1ai3[2])             # <<<<<<<<<<<<<<
 * 
 *     # vec CD
 */
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_17 = 0;
  __pyx_t_16 = 1;
  __pyx_t_15 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg1ai3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1192, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1192, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_bz1 = __pyx_t_23;
  __pyx_v_bz2 = __pyx_t_22;
  __pyx_v_bz3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1195
 * 
 *     # vec CD
 *     [cx1,cx2,cx3]=sub(seg2di1[0],seg2di1[1],seg2di1[2],seg2ci1[0],seg2ci1[1],seg2ci1[2])             # <<<<<<<<<<<<<<
 *     [cy1,cy2,cy3]=sub(seg2di2[0],seg2di2[1],seg2di2[2],seg2ci2[0],seg2ci2[1],seg2ci2[2])
 *     [cz1,cz2,cz3]=sub(seg2di3[0],seg2di3[1],seg2di3[2],seg2ci3[0],seg2ci3[1],seg2ci3[2])
 */
  __pyx_t_15 = 0;
  __pyx_t_16 = 1;
  __pyx_t_17 = 2;
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di1.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg2di1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di1.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg2di1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di1.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg2di1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2ci1.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1195, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1195, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_cx1 = __pyx_t_21;
  __pyx_v_cx2 = __pyx_t_22;
  __pyx_v_cx3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1196
 *     # vec CD
 *     [cx1,cx2,cx3]=sub(seg2di1[0],seg2di1[1],seg2di1[2],seg2ci1[0],seg2ci1[1],seg2ci1[2])
 *     [cy1,cy2,cy3]=sub(seg2di2[0],seg2di2[1],seg2di2[2],seg2ci2[0],seg2ci2[1],seg2ci2[2])             # <<<<<<<<<<<<<<
 *     [cz1,cz2,cz3]=sub(seg2di3[0],seg2di3[1],seg2di3[2],seg2ci3[0],seg2ci3[1],seg2ci3[2])
 * 
 */
  __pyx_t_20 = 0;
  __pyx_t_19 = 1;
  __pyx_t_18 = 2;
  __pyx_t_17 = 0;
  __pyx_t_16 = 1;
  __pyx_t_15 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di2.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2di2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di2.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2di2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di2.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2di2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg2ci2.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1196, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1196, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cy1 = __pyx_t_23;
  __pyx_v_cy2 = __pyx_t_22;
  __pyx_v_cy3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1197
 *     [cx1,cx2,cx3]=sub(seg2di1[0],seg2di1[1],seg2di1[2],seg2ci1[0],seg2ci1[1],seg2ci1[2])
 *     [cy1,cy2,cy3]=sub(seg2di2[0],seg2di2[1],seg2di2[2],seg2ci2[0],seg2ci2[1],seg2ci2[2])
 *     [cz1,cz2,cz3]=sub(seg2di3[0],seg2di3[1],seg2di3[2],seg2ci3[0],seg2ci3[1],seg2ci3[2])             # <<<<<<<<<<<<<<
 * 
 *     # dot_product(vecAC,vecCD)
 */
  __pyx_t_15 = 0;
  __pyx_t_16 = 1;
  __pyx_t_17 = 2;
  __pyx_t_18 = 0;
  __pyx_t_19 = 1;
  __pyx_t_20 = 2;
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di3.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_seg2di3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di3.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seg2di3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2di3.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seg2di3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seg2ci3.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1197, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1197, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_cz1 = __pyx_t_21;
  __pyx_v_cz2 = __pyx_t_22;
  __pyx_v_cz3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1200
 * 
 *     # dot_product(vecAC,vecCD)
 *     a1,a2,a3=dot_product(np.array([bx1,bx2,bx3]),np.array([by1,by2,by3]),np.array([bz1,bz2,bz3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))             # <<<<<<<<<<<<<<
 *     # dot_product(vecCD,vecAB)
 *     b1,b2,b3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_bx1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_bx2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_bx3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_by1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_by2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_by3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_8);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_bz1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_bz2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_bz3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_24) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_24);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_4);
  __pyx_t_24 = 0;
  __pyx_t_6 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_8 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_24);
  __pyx_t_25 = 0;
  __pyx_t_6 = 0;
  __pyx_t_24 = 0;
  __pyx_t_24 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_24)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_24);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_24, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_26);
  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __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_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_array); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_25);
  __pyx_t_26 = 0;
  __pyx_t_6 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_24))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_24);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_24, function);
    }
  }
  __pyx_t_4 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_24, __pyx_t_25, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_24, __pyx_t_27);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_24 != Py_None)) {
    PyObject* sequence = __pyx_t_24;
    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(0, 1200, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1200, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_a1 = __pyx_t_23;
  __pyx_v_a2 = __pyx_t_22;
  __pyx_v_a3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1202
 *     a1,a2,a3=dot_product(np.array([bx1,bx2,bx3]),np.array([by1,by2,by3]),np.array([bz1,bz2,bz3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 *     # dot_product(vecCD,vecAB)
 *     b1,b2,b3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))             # <<<<<<<<<<<<<<
 *     # dot_product(vecCD,vecCD)
 *     c1,c2,c3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_24 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_24) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_24, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_4 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __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_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_27);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_n_s_np); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_5);
  __pyx_t_27 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_27);
  __pyx_t_25 = 0;
  __pyx_t_4 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_27, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_25);
  __pyx_t_6 = 0;
  __pyx_t_4 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_27);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_27, function);
    }
  }
  __pyx_t_5 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_27, __pyx_t_25, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_27, __pyx_t_26);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_t_27 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_24), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_5), 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(__pyx_t_27 != Py_None)) {
    PyObject* sequence = __pyx_t_27;
    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(0, 1202, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1202, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_b1 = __pyx_t_21;
  __pyx_v_b2 = __pyx_t_22;
  __pyx_v_b3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1204
 *     b1,b2,b3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))
 *     # dot_product(vecCD,vecCD)
 *     c1,c2,c3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))             # <<<<<<<<<<<<<<
 *     # dot_product(vecAC,vecAB)
 *     d1,d2,d3=dot_product(np.array([bx1,bx2,bx3]),np.array([by1,by2,by3]),np.array([bz1,bz2,bz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_27 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_8);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_24) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_24);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_3);
  __pyx_t_24 = 0;
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_26);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_24);
  __pyx_t_26 = 0;
  __pyx_t_5 = 0;
  __pyx_t_24 = 0;
  __pyx_t_24 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_24)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_24);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_8 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_24, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_26);
  __pyx_t_25 = 0;
  __pyx_t_5 = 0;
  __pyx_t_26 = 0;
  __pyx_t_26 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_24))) {
    __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_24);
    if (likely(__pyx_t_26)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24);
      __Pyx_INCREF(__pyx_t_26);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_24, function);
    }
  }
  __pyx_t_3 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_24, __pyx_t_26, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_24, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_25);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_26);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_26, function);
    }
  }
  __pyx_t_24 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_26, __pyx_t_25, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (!(likely(((__pyx_t_24) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_24, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __pyx_t_26 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_27), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_24), 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (likely(__pyx_t_26 != Py_None)) {
    PyObject* sequence = __pyx_t_26;
    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(0, 1204, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_24);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1204, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_c1 = __pyx_t_23;
  __pyx_v_c2 = __pyx_t_22;
  __pyx_v_c3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1206
 *     c1,c2,c3=dot_product(np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 *     # dot_product(vecAC,vecAB)
 *     d1,d2,d3=dot_product(np.array([bx1,bx2,bx3]),np.array([by1,by2,by3]),np.array([bz1,bz2,bz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))             # <<<<<<<<<<<<<<
 *     # dot_product(vecAB,vecCD)
 *     e1,e2,e3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_bx1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_bx2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_bx3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_24 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_26 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_by1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_by2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_by3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_24 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_27);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __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_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_n_s_np); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_bz1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_bz2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_bz3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
  __pyx_t_27 = 0;
  __pyx_t_24 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_27);
  __pyx_t_6 = 0;
  __pyx_t_24 = 0;
  __pyx_t_27 = 0;
  __pyx_t_27 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_27)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_27);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_8 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_27, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
  __pyx_t_25 = 0;
  __pyx_t_24 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_27);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_27, function);
    }
  }
  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_27, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_27, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_25);
  __pyx_t_5 = 0;
  __pyx_t_24 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_27 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_25, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_27) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_27, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __pyx_t_6 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_26), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_27), 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (likely(__pyx_t_6 != Py_None)) {
    PyObject* sequence = __pyx_t_6;
    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(0, 1206, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_27 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_27);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_27 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1206, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_27); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_d1 = __pyx_t_21;
  __pyx_v_d2 = __pyx_t_22;
  __pyx_v_d3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1208
 *     d1,d2,d3=dot_product(np.array([bx1,bx2,bx3]),np.array([by1,by2,by3]),np.array([bz1,bz2,bz3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))
 *     # dot_product(vecAB,vecCD)
 *     e1,e2,e3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))             # <<<<<<<<<<<<<<
 *     # dot_product(vecAB,vecAB)
 *     f1,f2,f3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_27 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_8);
  __pyx_t_3 = 0;
  __pyx_t_27 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_26);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_26 = 0;
  __pyx_t_27 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_26);
  __pyx_t_4 = 0;
  __pyx_t_27 = 0;
  __pyx_t_26 = 0;
  __pyx_t_26 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_26)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_26);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_8 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_26, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_4);
  __pyx_t_25 = 0;
  __pyx_t_27 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_26);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_26, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_26, __pyx_t_4, __pyx_t_24) : __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_24);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_24);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_25);
  __pyx_t_24 = 0;
  __pyx_t_27 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_26 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_25, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_26), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    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(0, 1208, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_26 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_26);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_26 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1208, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_26); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_e1 = __pyx_t_23;
  __pyx_v_e2 = __pyx_t_22;
  __pyx_v_e3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1210
 *     e1,e2,e3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 *     # dot_product(vecAB,vecAB)
 *     f1,f2,f3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]))             # <<<<<<<<<<<<<<
 * 
 *     #bunbo=dot_product(vecAB,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecAB,vecAB)*dot_product(vecCD,vecCD)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
  __pyx_t_8 = 0;
  __pyx_t_26 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_26 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __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_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_7);
  __pyx_t_6 = 0;
  __pyx_t_26 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_6);
  __pyx_t_5 = 0;
  __pyx_t_26 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_25);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_5);
  __pyx_t_25 = 0;
  __pyx_t_26 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_27);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_n_s_np); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_GIVEREF(__pyx_t_27);
  PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_27);
  __Pyx_GIVEREF(__pyx_t_26);
  PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_26);
  __Pyx_GIVEREF(__pyx_t_25);
  PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_25);
  __pyx_t_27 = 0;
  __pyx_t_26 = 0;
  __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_25, __pyx_t_24) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_6), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1210, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1210, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_f1 = __pyx_t_21;
  __pyx_v_f2 = __pyx_t_22;
  __pyx_v_f3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1213
 * 
 *     #bunbo=dot_product(vecAB,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecAB,vecAB)*dot_product(vecCD,vecCD)
 *     m1,m2,m3=mul(e1,e2,e3,b1,b2,b3)             # <<<<<<<<<<<<<<
 *     n1,n2,n3=mul(f1,f2,f3,c1,c2,c3)
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)
 */
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_e1, __pyx_v_e2, __pyx_v_e3, __pyx_v_b1, __pyx_v_b2, __pyx_v_b3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1213, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1213, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_m1 = __pyx_t_23;
  __pyx_v_m2 = __pyx_t_22;
  __pyx_v_m3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1214
 *     #bunbo=dot_product(vecAB,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecAB,vecAB)*dot_product(vecCD,vecCD)
 *     m1,m2,m3=mul(e1,e2,e3,b1,b2,b3)
 *     n1,n2,n3=mul(f1,f2,f3,c1,c2,c3)             # <<<<<<<<<<<<<<
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)
 *     tmp1a=np.array([0])
 */
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_f1, __pyx_v_f2, __pyx_v_f3, __pyx_v_c1, __pyx_v_c2, __pyx_v_c3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1214, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1214, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_n1 = __pyx_t_21;
  __pyx_v_n2 = __pyx_t_22;
  __pyx_v_n3 = __pyx_t_23;

  /* "pyqcstrc/icosah/intsct.pyx":1215
 *     m1,m2,m3=mul(e1,e2,e3,b1,b2,b3)
 *     n1,n2,n3=mul(f1,f2,f3,c1,c2,c3)
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)             # <<<<<<<<<<<<<<
 *     tmp1a=np.array([0])
 *     if p1!=0 or p2!=0:
 */
  __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_m1, __pyx_v_m2, __pyx_v_m3, __pyx_v_n1, __pyx_v_n2, __pyx_v_n3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(__pyx_t_5 != Py_None)) {
    PyObject* sequence = __pyx_t_5;
    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(0, 1215, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1215, __pyx_L1_error)
  }
  __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_p1 = __pyx_t_23;
  __pyx_v_p2 = __pyx_t_22;
  __pyx_v_p3 = __pyx_t_21;

  /* "pyqcstrc/icosah/intsct.pyx":1216
 *     n1,n2,n3=mul(f1,f2,f3,c1,c2,c3)
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     if p1!=0 or p2!=0:
 *         # bunshi=dot_product(vecAC,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecCD,vecCD)*dot_product(vecAC,vecAB)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1216, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1216, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1217
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)
 *     tmp1a=np.array([0])
 *     if p1!=0 or p2!=0:             # <<<<<<<<<<<<<<
 *         # bunshi=dot_product(vecAC,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecCD,vecCD)*dot_product(vecAC,vecAB)
 *         m1,m2,m3=mul(a1,a2,a3,b1,b2,b3)
 */
  __pyx_t_29 = ((__pyx_v_p1 != 0) != 0);
  if (!__pyx_t_29) {
  } else {
    __pyx_t_1 = __pyx_t_29;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_29 = ((__pyx_v_p2 != 0) != 0);
  __pyx_t_1 = __pyx_t_29;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1219
 *     if p1!=0 or p2!=0:
 *         # bunshi=dot_product(vecAC,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecCD,vecCD)*dot_product(vecAC,vecAB)
 *         m1,m2,m3=mul(a1,a2,a3,b1,b2,b3)             # <<<<<<<<<<<<<<
 *         n1,n2,n3=mul(c1,c2,c3,d1,d2,d3)
 *         o1,o2,o3=sub(m1,m2,m3,n1,n2,n3)
 */
    __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_a1, __pyx_v_a2, __pyx_v_a3, __pyx_v_b1, __pyx_v_b2, __pyx_v_b3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(__pyx_t_5 != Py_None)) {
      PyObject* sequence = __pyx_t_5;
      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(0, 1219, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1219, __pyx_L1_error)
    }
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_m1 = __pyx_t_21;
    __pyx_v_m2 = __pyx_t_22;
    __pyx_v_m3 = __pyx_t_23;

    /* "pyqcstrc/icosah/intsct.pyx":1220
 *         # bunshi=dot_product(vecAC,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecCD,vecCD)*dot_product(vecAC,vecAB)
 *         m1,m2,m3=mul(a1,a2,a3,b1,b2,b3)
 *         n1,n2,n3=mul(c1,c2,c3,d1,d2,d3)             # <<<<<<<<<<<<<<
 *         o1,o2,o3=sub(m1,m2,m3,n1,n2,n3)
 *         #
 */
    __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_c1, __pyx_v_c2, __pyx_v_c3, __pyx_v_d1, __pyx_v_d2, __pyx_v_d3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(__pyx_t_5 != Py_None)) {
      PyObject* sequence = __pyx_t_5;
      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(0, 1220, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_8 = 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_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1220, __pyx_L1_error)
    }
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_n1 = __pyx_t_23;
    __pyx_v_n2 = __pyx_t_22;
    __pyx_v_n3 = __pyx_t_21;

    /* "pyqcstrc/icosah/intsct.pyx":1221
 *         m1,m2,m3=mul(a1,a2,a3,b1,b2,b3)
 *         n1,n2,n3=mul(c1,c2,c3,d1,d2,d3)
 *         o1,o2,o3=sub(m1,m2,m3,n1,n2,n3)             # <<<<<<<<<<<<<<
 *         #
 *         # Numerical calc
 */
    __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_m1, __pyx_v_m2, __pyx_v_m3, __pyx_v_n1, __pyx_v_n2, __pyx_v_n3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(__pyx_t_5 != Py_None)) {
      PyObject* sequence = __pyx_t_5;
      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(0, 1221, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1221, __pyx_L1_error)
    }
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_o1 = __pyx_t_21;
    __pyx_v_o2 = __pyx_t_22;
    __pyx_v_o3 = __pyx_t_23;

    /* "pyqcstrc/icosah/intsct.pyx":1226
 *         #
 *         # s=bunshi/bunbo
 *         s1,s2,s3=div(o1,o2,o3,p1,p2,p3)             # <<<<<<<<<<<<<<
 *         s=(s1+TAU*s2)/s3
 *         #t=(-dot_product(vecAC,vecCD)+s*dot_product(vecAB,vecCD))/dot_product(vecCD,vecCD)
 */
    __pyx_t_5 = __pyx_f_8pyqcstrc_6icosah_5math1_div(__pyx_v_o1, __pyx_v_o2, __pyx_v_o3, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(__pyx_t_5 != Py_None)) {
      PyObject* sequence = __pyx_t_5;
      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(0, 1226, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_8 = 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_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1226, __pyx_L1_error)
    }
    __pyx_v_s1 = __pyx_t_8;
    __pyx_t_8 = 0;
    __pyx_v_s2 = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_s3 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1227
 *         # s=bunshi/bunbo
 *         s1,s2,s3=div(o1,o2,o3,p1,p2,p3)
 *         s=(s1+TAU*s2)/s3             # <<<<<<<<<<<<<<
 *         #t=(-dot_product(vecAC,vecCD)+s*dot_product(vecAB,vecCD))/dot_product(vecCD,vecCD)
 *         # dot_product(vecAB,vecCD)
 */
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_6intsct_TAU); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_v_s2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_v_s1, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_v_s3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_30 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_s = __pyx_t_30;

    /* "pyqcstrc/icosah/intsct.pyx":1230
 *         #t=(-dot_product(vecAC,vecCD)+s*dot_product(vecAB,vecCD))/dot_product(vecCD,vecCD)
 *         # dot_product(vecAB,vecCD)
 *         g1,g2,g3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))             # <<<<<<<<<<<<<<
 *         h1,h2,h3=mul(s1,s2,s3,g1,g2,g3)
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ax1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ax2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_ax3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && 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_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_ay1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_ay2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_ay3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_az1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_az2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_az3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_8 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_24) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_24);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cx1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cx2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_cx3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_GIVEREF(__pyx_t_24);
    PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_4);
    __pyx_t_24 = 0;
    __pyx_t_8 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_25) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_25);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cy1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cy2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_cy3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_GIVEREF(__pyx_t_25);
    PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_25);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_24);
    PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_24);
    __pyx_t_25 = 0;
    __pyx_t_8 = 0;
    __pyx_t_24 = 0;
    __pyx_t_24 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_24)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_24);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_24, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_26);
    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __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_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_array); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_cz1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_cz2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_cz3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_27 = PyList_New(3); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    __Pyx_GIVEREF(__pyx_t_26);
    PyList_SET_ITEM(__pyx_t_27, 0, __pyx_t_26);
    __Pyx_GIVEREF(__pyx_t_8);
    PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_25);
    PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_25);
    __pyx_t_26 = 0;
    __pyx_t_8 = 0;
    __pyx_t_25 = 0;
    __pyx_t_25 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_24))) {
      __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_24);
      if (likely(__pyx_t_25)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24);
        __Pyx_INCREF(__pyx_t_25);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_24, function);
      }
    }
    __pyx_t_4 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_24, __pyx_t_25, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_24, __pyx_t_27);
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1230, __pyx_L1_error)
    __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_dot_product(((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(__pyx_t_24 != Py_None)) {
      PyObject* sequence = __pyx_t_24;
      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(0, 1230, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __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_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1230, __pyx_L1_error)
    }
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_g1 = __pyx_t_23;
    __pyx_v_g2 = __pyx_t_22;
    __pyx_v_g3 = __pyx_t_21;

    /* "pyqcstrc/icosah/intsct.pyx":1231
 *         # dot_product(vecAB,vecCD)
 *         g1,g2,g3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 *         h1,h2,h3=mul(s1,s2,s3,g1,g2,g3)             # <<<<<<<<<<<<<<
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)
 *         if verbose>1:
 */
    __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_g1, __pyx_v_g2, __pyx_v_g3, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    if (likely(__pyx_t_24 != Py_None)) {
      PyObject* sequence = __pyx_t_24;
      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(0, 1231, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = 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_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1231, __pyx_L1_error)
    }
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_h1 = __pyx_t_21;
    __pyx_v_h2 = __pyx_t_22;
    __pyx_v_h3 = __pyx_t_23;

    /* "pyqcstrc/icosah/intsct.pyx":1232
 *         g1,g2,g3=dot_product(np.array([ax1,ax2,ax3]),np.array([ay1,ay2,ay3]),np.array([az1,az2,az3]),np.array([cx1,cx2,cx3]),np.array([cy1,cy2,cy3]),np.array([cz1,cz2,cz3]))
 *         h1,h2,h3=mul(s1,s2,s3,g1,g2,g3)
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('                           s = %8.6f'%(s))
 */
    __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_h1, __pyx_v_h2, __pyx_v_h3, __pyx_v_a1, __pyx_v_a2, __pyx_v_a3, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    if (likely(__pyx_t_24 != Py_None)) {
      PyObject* sequence = __pyx_t_24;
      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(0, 1232, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __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_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1232, __pyx_L1_error)
    }
    __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_h1 = __pyx_t_23;
    __pyx_v_h2 = __pyx_t_22;
    __pyx_v_h3 = __pyx_t_21;

    /* "pyqcstrc/icosah/intsct.pyx":1233
 *         h1,h2,h3=mul(s1,s2,s3,g1,g2,g3)
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('                           s = %8.6f'%(s))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1234
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)
 *         if verbose>1:
 *             print('                           s = %8.6f'%(s))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_24 = PyFloat_FromDouble(__pyx_v_s); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_s_8_6f, __pyx_t_24); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1233
 *         h1,h2,h3=mul(s1,s2,s3,g1,g2,g3)
 *         h1,h2,h3=sub(h1,h2,h3,a1,a2,a3)
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('                           s = %8.6f'%(s))
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1236
 *             print('                           s = %8.6f'%(s))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         if c1!=0 or c2!=0:
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/intsct.pyx":1237
 *         else:
 *             pass
 *         if c1!=0 or c2!=0:             # <<<<<<<<<<<<<<
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 *             t=(t1+TAU*t2)/t3
 */
    __pyx_t_29 = ((__pyx_v_c1 != 0) != 0);
    if (!__pyx_t_29) {
    } else {
      __pyx_t_1 = __pyx_t_29;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_29 = ((__pyx_v_c2 != 0) != 0);
    __pyx_t_1 = __pyx_t_29;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1238
 *             pass
 *         if c1!=0 or c2!=0:
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)             # <<<<<<<<<<<<<<
 *             t=(t1+TAU*t2)/t3
 *             if verbose>1:
 */
      __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_div(__pyx_v_h1, __pyx_v_h2, __pyx_v_h3, __pyx_v_c1, __pyx_v_c2, __pyx_v_c3, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      if (likely(__pyx_t_24 != Py_None)) {
        PyObject* sequence = __pyx_t_24;
        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(0, 1238, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = 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_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1238, __pyx_L1_error)
      }
      __pyx_v_t1 = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_t2 = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_t3 = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1239
 *         if c1!=0 or c2!=0:
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 *             t=(t1+TAU*t2)/t3             # <<<<<<<<<<<<<<
 *             if verbose>1:
 *                 print('                           t = %8.6f'%(t))
 */
      __pyx_t_24 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_6intsct_TAU); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_4 = PyNumber_Multiply(__pyx_t_24, __pyx_v_t2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = PyNumber_Add(__pyx_v_t1, __pyx_t_4); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_24, __pyx_v_t3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_30 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_t = __pyx_t_30;

      /* "pyqcstrc/icosah/intsct.pyx":1240
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 *             t=(t1+TAU*t2)/t3
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('                           t = %8.6f'%(t))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1241
 *             t=(t1+TAU*t2)/t3
 *             if verbose>1:
 *                 print('                           t = %8.6f'%(t))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_4 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_24 = PyUnicode_Format(__pyx_kp_u_t_8_6f, __pyx_t_4); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_24);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1240
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 *             t=(t1+TAU*t2)/t3
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('                           t = %8.6f'%(t))
 *             else:
 */
        goto __pyx_L12;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1243
 *                 print('                           t = %8.6f'%(t))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             if s>=0.0 and s<=1.0 and t>=0.0 and t<=1.0:
 *                 # ddx=(L2ax-L1ax)-s*(L1bx-L1ax)+t*(L2bx-L2ax)
 */
      /*else*/ {
      }
      __pyx_L12:;

      /* "pyqcstrc/icosah/intsct.pyx":1244
 *             else:
 *                 pass
 *             if s>=0.0 and s<=1.0 and t>=0.0 and t<=1.0:             # <<<<<<<<<<<<<<
 *                 # ddx=(L2ax-L1ax)-s*(L1bx-L1ax)+t*(L2bx-L2ax)
 *                 #bx1,bx2,bx3 # (L2ax-L1ax)
 */
      __pyx_t_29 = ((__pyx_v_s >= 0.0) != 0);
      if (__pyx_t_29) {
      } else {
        __pyx_t_1 = __pyx_t_29;
        goto __pyx_L14_bool_binop_done;
      }
      __pyx_t_29 = ((__pyx_v_s <= 1.0) != 0);
      if (__pyx_t_29) {
      } else {
        __pyx_t_1 = __pyx_t_29;
        goto __pyx_L14_bool_binop_done;
      }
      __pyx_t_29 = ((__pyx_v_t >= 0.0) != 0);
      if (__pyx_t_29) {
      } else {
        __pyx_t_1 = __pyx_t_29;
        goto __pyx_L14_bool_binop_done;
      }
      __pyx_t_29 = ((__pyx_v_t <= 1.0) != 0);
      __pyx_t_1 = __pyx_t_29;
      __pyx_L14_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1249
 *                 #mul(s1,s2,s3,ax1,ax2,ax3) # s*(L1bx-L1ax)
 *                 #mul(t1,t2,t3,cx1,cx2,cx3) # t*(L2bx-L2ax)
 *                 ddx1,ddx2,ddx3=mul(s1,s2,s3,ax1,ax2,ax3)             # <<<<<<<<<<<<<<
 *                 ddx1,ddx2,ddx3=sub(bx1,bx2,bx3,ddx1,ddx2,ddx3)
 *                 z1,z2,z3=mul(t1,t2,t3,cx1,cx2,cx3)
 */
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_ax1, __pyx_v_ax2, __pyx_v_ax3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1249, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1249, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1249, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1249, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_ddx1 = __pyx_t_21;
        __pyx_v_ddx2 = __pyx_t_22;
        __pyx_v_ddx3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1250
 *                 #mul(t1,t2,t3,cx1,cx2,cx3) # t*(L2bx-L2ax)
 *                 ddx1,ddx2,ddx3=mul(s1,s2,s3,ax1,ax2,ax3)
 *                 ddx1,ddx2,ddx3=sub(bx1,bx2,bx3,ddx1,ddx2,ddx3)             # <<<<<<<<<<<<<<
 *                 z1,z2,z3=mul(t1,t2,t3,cx1,cx2,cx3)
 *                 ddx1,ddx2,ddx3=add(ddx1,ddx2,ddx3,z1,z2,z3)
 */
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_bx1, __pyx_v_bx2, __pyx_v_bx3, __pyx_v_ddx1, __pyx_v_ddx2, __pyx_v_ddx3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1250, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1250, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1250, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1250, __pyx_L1_error)
        }
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_v_ddx1 = __pyx_t_23;
        __pyx_v_ddx2 = __pyx_t_22;
        __pyx_v_ddx3 = __pyx_t_21;

        /* "pyqcstrc/icosah/intsct.pyx":1251
 *                 ddx1,ddx2,ddx3=mul(s1,s2,s3,ax1,ax2,ax3)
 *                 ddx1,ddx2,ddx3=sub(bx1,bx2,bx3,ddx1,ddx2,ddx3)
 *                 z1,z2,z3=mul(t1,t2,t3,cx1,cx2,cx3)             # <<<<<<<<<<<<<<
 *                 ddx1,ddx2,ddx3=add(ddx1,ddx2,ddx3,z1,z2,z3)
 *                 # ddx**2
 */
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_t1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_t2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_t3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_cx1, __pyx_v_cx2, __pyx_v_cx3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1251, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1251, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_z1 = __pyx_t_21;
        __pyx_v_z2 = __pyx_t_22;
        __pyx_v_z3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1252
 *                 ddx1,ddx2,ddx3=sub(bx1,bx2,bx3,ddx1,ddx2,ddx3)
 *                 z1,z2,z3=mul(t1,t2,t3,cx1,cx2,cx3)
 *                 ddx1,ddx2,ddx3=add(ddx1,ddx2,ddx3,z1,z2,z3)             # <<<<<<<<<<<<<<
 *                 # ddx**2
 *                 ddx1,ddx2,ddx3=mul(ddx1,ddx2,ddx3,ddx1,ddx2,ddx3)
 */
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_ddx1, __pyx_v_ddx2, __pyx_v_ddx3, __pyx_v_z1, __pyx_v_z2, __pyx_v_z3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1252, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1252, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1252, __pyx_L1_error)
        }
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_v_ddx1 = __pyx_t_23;
        __pyx_v_ddx2 = __pyx_t_22;
        __pyx_v_ddx3 = __pyx_t_21;

        /* "pyqcstrc/icosah/intsct.pyx":1254
 *                 ddx1,ddx2,ddx3=add(ddx1,ddx2,ddx3,z1,z2,z3)
 *                 # ddx**2
 *                 ddx1,ddx2,ddx3=mul(ddx1,ddx2,ddx3,ddx1,ddx2,ddx3)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('           ddx1,ddx2 = %d %d'%(ddx1,ddx2))
 */
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_ddx1, __pyx_v_ddx2, __pyx_v_ddx3, __pyx_v_ddx1, __pyx_v_ddx2, __pyx_v_ddx3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1254, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1254, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_ddx1 = __pyx_t_21;
        __pyx_v_ddx2 = __pyx_t_22;
        __pyx_v_ddx3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1255
 *                 # ddx**2
 *                 ddx1,ddx2,ddx3=mul(ddx1,ddx2,ddx3,ddx1,ddx2,ddx3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddx1,ddx2 = %d %d'%(ddx1,ddx2))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1256
 *                 ddx1,ddx2,ddx3=mul(ddx1,ddx2,ddx3,ddx1,ddx2,ddx3)
 *                 if verbose>1:
 *                     print('           ddx1,ddx2 = %d %d'%(ddx1,ddx2))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_34 = 0;
          __pyx_t_35 = 127;
          __Pyx_INCREF(__pyx_kp_u_ddx1_ddx2);
          __pyx_t_34 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_ddx1_ddx2);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_ddx1_ddx2);
          __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_ddx1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
          __pyx_t_5 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_34 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
          __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_ddx2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_34, __pyx_t_35); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __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_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1255
 *                 # ddx**2
 *                 ddx1,ddx2,ddx3=mul(ddx1,ddx2,ddx3,ddx1,ddx2,ddx3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddx1,ddx2 = %d %d'%(ddx1,ddx2))
 *                 else:
 */
          goto __pyx_L18;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1258
 *                     print('           ddx1,ddx2 = %d %d'%(ddx1,ddx2))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 # ddy=(L2ay-L1ay)-s*(L1by-L1ay)+t*(L2by-L2ay)
 *                 ddy1,ddy2,ddy3=mul(s1,s2,s3,ay1,ay2,ay3)
 */
        /*else*/ {
        }
        __pyx_L18:;

        /* "pyqcstrc/icosah/intsct.pyx":1260
 *                     pass
 *                 # ddy=(L2ay-L1ay)-s*(L1by-L1ay)+t*(L2by-L2ay)
 *                 ddy1,ddy2,ddy3=mul(s1,s2,s3,ay1,ay2,ay3)             # <<<<<<<<<<<<<<
 *                 ddy1,ddy2,ddy3=sub(by1,by2,by3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=mul(t1,t2,t3,cy1,cy2,cy3)
 */
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_ay1, __pyx_v_ay2, __pyx_v_ay3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1260, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1260, __pyx_L1_error)
        }
        __pyx_v_ddy1 = __pyx_t_5;
        __pyx_t_5 = 0;
        __pyx_v_ddy2 = __pyx_t_3;
        __pyx_t_3 = 0;
        __pyx_v_ddy3 = __pyx_t_24;
        __pyx_t_24 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1261
 *                 # ddy=(L2ay-L1ay)-s*(L1by-L1ay)+t*(L2by-L2ay)
 *                 ddy1,ddy2,ddy3=mul(s1,s2,s3,ay1,ay2,ay3)
 *                 ddy1,ddy2,ddy3=sub(by1,by2,by3,ddy1,ddy2,ddy3)             # <<<<<<<<<<<<<<
 *                 z1,z2,z3=mul(t1,t2,t3,cy1,cy2,cy3)
 *                 ddy1,ddy2,ddy3=add(ddy1,ddy2,ddy3,z1,z2,z3)
 */
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddy1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddy2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L1_error)
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddy3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_by1, __pyx_v_by2, __pyx_v_by3, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1261, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1261, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1261, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1261, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddy1, __pyx_t_24);
        __pyx_t_24 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy3, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1262
 *                 ddy1,ddy2,ddy3=mul(s1,s2,s3,ay1,ay2,ay3)
 *                 ddy1,ddy2,ddy3=sub(by1,by2,by3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=mul(t1,t2,t3,cy1,cy2,cy3)             # <<<<<<<<<<<<<<
 *                 ddy1,ddy2,ddy3=add(ddy1,ddy2,ddy3,z1,z2,z3)
 *                 # ddy**2
 */
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_t1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_t2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_t3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_cy1, __pyx_v_cy2, __pyx_v_cy3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1262, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1262, __pyx_L1_error)
        }
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_v_z1 = __pyx_t_23;
        __pyx_v_z2 = __pyx_t_22;
        __pyx_v_z3 = __pyx_t_21;

        /* "pyqcstrc/icosah/intsct.pyx":1263
 *                 ddy1,ddy2,ddy3=sub(by1,by2,by3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=mul(t1,t2,t3,cy1,cy2,cy3)
 *                 ddy1,ddy2,ddy3=add(ddy1,ddy2,ddy3,z1,z2,z3)             # <<<<<<<<<<<<<<
 *                 # ddy**2
 *                 ddy1,ddy2,ddy3=mul(ddy1,ddy2,ddy3,ddy1,ddy2,ddy3)
 */
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddy1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddy2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L1_error)
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddy3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_z1, __pyx_v_z2, __pyx_v_z3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1263, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1263, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1263, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1263, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddy1, __pyx_t_24);
        __pyx_t_24 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy3, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1265
 *                 ddy1,ddy2,ddy3=add(ddy1,ddy2,ddy3,z1,z2,z3)
 *                 # ddy**2
 *                 ddy1,ddy2,ddy3=mul(ddy1,ddy2,ddy3,ddy1,ddy2,ddy3)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('           ddy1,ddy2 = %d %d'%(ddy1,ddy2))
 */
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddy1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddy2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddy3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_ddy1); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_ddy2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_ddy3); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_t_36, __pyx_t_37, __pyx_t_38, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1265, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1265, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddy1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddy3, __pyx_t_24);
        __pyx_t_24 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1266
 *                 # ddy**2
 *                 ddy1,ddy2,ddy3=mul(ddy1,ddy2,ddy3,ddy1,ddy2,ddy3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddy1,ddy2 = %d %d'%(ddy1,ddy2))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1267
 *                 ddy1,ddy2,ddy3=mul(ddy1,ddy2,ddy3,ddy1,ddy2,ddy3)
 *                 if verbose>1:
 *                     print('           ddy1,ddy2 = %d %d'%(ddy1,ddy2))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_34 = 0;
          __pyx_t_35 = 127;
          __Pyx_INCREF(__pyx_kp_u_ddy1_ddy2);
          __pyx_t_34 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_ddy1_ddy2);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_ddy1_ddy2);
          __pyx_t_24 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_ddy1), __pyx_n_u_d); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_24) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_24) : __pyx_t_35;
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_24);
          __Pyx_GIVEREF(__pyx_t_24);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_24);
          __pyx_t_24 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_34 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
          __pyx_t_24 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_ddy2), __pyx_n_u_d); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_24) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_24) : __pyx_t_35;
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_24);
          __Pyx_GIVEREF(__pyx_t_24);
          PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_24);
          __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_34, __pyx_t_35); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1266
 *                 # ddy**2
 *                 ddy1,ddy2,ddy3=mul(ddy1,ddy2,ddy3,ddy1,ddy2,ddy3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddy1,ddy2 = %d %d'%(ddy1,ddy2))
 *                 else:
 */
          goto __pyx_L19;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1269
 *                     print('           ddy1,ddy2 = %d %d'%(ddy1,ddy2))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 # ddz=(L2az-L1az)-s*(L1bz-L1az)+t*(L2bz-L2az)
 *                 ddz1,ddz2,ddz3=mul(s1,s2,s3,az1,az2,az3)
 */
        /*else*/ {
        }
        __pyx_L19:;

        /* "pyqcstrc/icosah/intsct.pyx":1271
 *                     pass
 *                 # ddz=(L2az-L1az)-s*(L1bz-L1az)+t*(L2bz-L2az)
 *                 ddz1,ddz2,ddz3=mul(s1,s2,s3,az1,az2,az3)             # <<<<<<<<<<<<<<
 *                 ddz1,ddz2,ddz3=sub(bz1,bz2,bz3,ddz1,ddz2,ddz3)
 *                 z1,z2,z3=mul(t1,t2,t3,cz1,cz2,cz3)
 */
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L1_error)
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_v_az1, __pyx_v_az2, __pyx_v_az3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1271, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1271, __pyx_L1_error)
        }
        __pyx_v_ddz1 = __pyx_t_24;
        __pyx_t_24 = 0;
        __pyx_v_ddz2 = __pyx_t_3;
        __pyx_t_3 = 0;
        __pyx_v_ddz3 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1272
 *                 # ddz=(L2az-L1az)-s*(L1bz-L1az)+t*(L2bz-L2az)
 *                 ddz1,ddz2,ddz3=mul(s1,s2,s3,az1,az2,az3)
 *                 ddz1,ddz2,ddz3=sub(bz1,bz2,bz3,ddz1,ddz2,ddz3)             # <<<<<<<<<<<<<<
 *                 z1,z2,z3=mul(t1,t2,t3,cz1,cz2,cz3)
 *                 ddz1,ddz2,ddz3=add(ddz1,ddz2,ddz3,z1,z2,z3)
 */
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_ddz1); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_ddz2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L1_error)
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_ddz3); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_v_bz1, __pyx_v_bz2, __pyx_v_bz3, __pyx_t_36, __pyx_t_37, __pyx_t_38, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1272, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1272, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddz1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz3, __pyx_t_24);
        __pyx_t_24 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1273
 *                 ddz1,ddz2,ddz3=mul(s1,s2,s3,az1,az2,az3)
 *                 ddz1,ddz2,ddz3=sub(bz1,bz2,bz3,ddz1,ddz2,ddz3)
 *                 z1,z2,z3=mul(t1,t2,t3,cz1,cz2,cz3)             # <<<<<<<<<<<<<<
 *                 ddz1,ddz2,ddz3=add(ddz1,ddz2,ddz3,z1,z2,z3)
 *                 # ddz**2
 */
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_t1); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_t2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_t3); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_v_cz1, __pyx_v_cz2, __pyx_v_cz3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1273, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1273, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_z1 = __pyx_t_21;
        __pyx_v_z2 = __pyx_t_22;
        __pyx_v_z3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1274
 *                 ddz1,ddz2,ddz3=sub(bz1,bz2,bz3,ddz1,ddz2,ddz3)
 *                 z1,z2,z3=mul(t1,t2,t3,cz1,cz2,cz3)
 *                 ddz1,ddz2,ddz3=add(ddz1,ddz2,ddz3,z1,z2,z3)             # <<<<<<<<<<<<<<
 *                 # ddz**2
 *                 ddz1,ddz2,ddz3=mul(ddz1,ddz2,ddz3,ddz1,ddz2,ddz3)
 */
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_ddz1); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_ddz2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L1_error)
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_ddz3); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_v_z1, __pyx_v_z2, __pyx_v_z3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1274, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1274, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddz1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz3, __pyx_t_24);
        __pyx_t_24 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1276
 *                 ddz1,ddz2,ddz3=add(ddz1,ddz2,ddz3,z1,z2,z3)
 *                 # ddz**2
 *                 ddz1,ddz2,ddz3=mul(ddz1,ddz2,ddz3,ddz1,ddz2,ddz3)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('           ddz1,ddz2 = %d %d'%(ddz1,ddz2))
 */
        __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_v_ddz1); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_v_ddz2); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_v_ddz3); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddz1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddz2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddz3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1276, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1276, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_ddz1, __pyx_t_24);
        __pyx_t_24 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_ddz3, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1277
 *                 # ddz**2
 *                 ddz1,ddz2,ddz3=mul(ddz1,ddz2,ddz3,ddz1,ddz2,ddz3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddz1,ddz2 = %d %d'%(ddz1,ddz2))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1278
 *                 ddz1,ddz2,ddz3=mul(ddz1,ddz2,ddz3,ddz1,ddz2,ddz3)
 *                 if verbose>1:
 *                     print('           ddz1,ddz2 = %d %d'%(ddz1,ddz2))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_34 = 0;
          __pyx_t_35 = 127;
          __Pyx_INCREF(__pyx_kp_u_ddz1_ddz2);
          __pyx_t_34 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_ddz1_ddz2);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_ddz1_ddz2);
          __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_ddz1), __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_35;
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
          __pyx_t_5 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_34 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
          __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_ddz2), __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_35;
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_34, __pyx_t_35); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __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_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1277
 *                 # ddz**2
 *                 ddz1,ddz2,ddz3=mul(ddz1,ddz2,ddz3,ddz1,ddz2,ddz3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           ddz1,ddz2 = %d %d'%(ddz1,ddz2))
 *                 else:
 */
          goto __pyx_L20;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1280
 *                     print('           ddz1,ddz2 = %d %d'%(ddz1,ddz2))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 * 
 *                 z1,z2,z3=add(ddx1,ddx2,ddx3,ddy1,ddy2,ddy3)
 */
        /*else*/ {
        }
        __pyx_L20:;

        /* "pyqcstrc/icosah/intsct.pyx":1282
 *                     pass
 * 
 *                 z1,z2,z3=add(ddx1,ddx2,ddx3,ddy1,ddy2,ddy3)             # <<<<<<<<<<<<<<
 *                 z1,z2,z3=add(z1,z2,z3,ddz1,ddz2,ddz3)
 *                 if verbose>1:
 */
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddy1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddy2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddy3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_ddx1, __pyx_v_ddx2, __pyx_v_ddx3, __pyx_t_33, __pyx_t_32, __pyx_t_31, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1282, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_24);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1282, __pyx_L1_error)
        }
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_v_z1 = __pyx_t_23;
        __pyx_v_z2 = __pyx_t_22;
        __pyx_v_z3 = __pyx_t_21;

        /* "pyqcstrc/icosah/intsct.pyx":1283
 * 
 *                 z1,z2,z3=add(ddx1,ddx2,ddx3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=add(z1,z2,z3,ddz1,ddz2,ddz3)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('           z1,z2 = %d %d'%(z1,z2))
 */
        __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_ddz1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_ddz2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_ddz3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_z1, __pyx_v_z2, __pyx_v_z3, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(__pyx_t_4 != Py_None)) {
          PyObject* sequence = __pyx_t_4;
          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(0, 1283, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1283, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1283, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1283, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_z1 = __pyx_t_21;
        __pyx_v_z2 = __pyx_t_22;
        __pyx_v_z3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1284
 *                 z1,z2,z3=add(ddx1,ddx2,ddx3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=add(z1,z2,z3,ddz1,ddz2,ddz3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           z1,z2 = %d %d'%(z1,z2))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1285
 *                 z1,z2,z3=add(z1,z2,z3,ddz1,ddz2,ddz3)
 *                 if verbose>1:
 *                     print('           z1,z2 = %d %d'%(z1,z2))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_34 = 0;
          __pyx_t_35 = 127;
          __Pyx_INCREF(__pyx_kp_u_z1_z2);
          __pyx_t_34 += 19;
          __Pyx_GIVEREF(__pyx_kp_u_z1_z2);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_z1_z2);
          __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_z1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
          __pyx_t_5 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_34 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5);
          __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_z2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_34 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_34, __pyx_t_35); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __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_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1284
 *                 z1,z2,z3=add(ddx1,ddx2,ddx3,ddy1,ddy2,ddy3)
 *                 z1,z2,z3=add(z1,z2,z3,ddz1,ddz2,ddz3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('           z1,z2 = %d %d'%(z1,z2))
 *                 else:
 */
          goto __pyx_L21;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1287
 *                     print('           z1,z2 = %d %d'%(z1,z2))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 #if ddx**2+ddy**2+ddz**2<EPS:
 *                 #if ddx1==0 and ddx2==0 and ddy1==0 and ddy2==0 and ddz1==0 and ddz2==0:
 */
        /*else*/ {
        }
        __pyx_L21:;

        /* "pyqcstrc/icosah/intsct.pyx":1290
 *                 #if ddx**2+ddy**2+ddz**2<EPS:
 *                 #if ddx1==0 and ddx2==0 and ddy1==0 and ddy2==0 and ddz1==0 and ddz2==0:
 *                 if z1==0 and z2==0:             # <<<<<<<<<<<<<<
 *                     #
 *                     #interval=line1a+s*(line1b-line1a)
 */
        __pyx_t_29 = ((__pyx_v_z1 == 0) != 0);
        if (__pyx_t_29) {
        } else {
          __pyx_t_1 = __pyx_t_29;
          goto __pyx_L23_bool_binop_done;
        }
        __pyx_t_29 = ((__pyx_v_z2 == 0) != 0);
        __pyx_t_1 = __pyx_t_29;
        __pyx_L23_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1295
 *                     #
 *                     # line1b-line1a
 *                     [h1,h2,h3]=sub(segment_1_B[0][0],segment_1_B[0][1],segment_1_B[0][2],segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2])             # <<<<<<<<<<<<<<
 *                     [h4,h5,h6]=sub(segment_1_B[1][0],segment_1_B[1][1],segment_1_B[1][2],segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2])
 *                     [h7,h8,h9]=sub(segment_1_B[2][0],segment_1_B[2][1],segment_1_B[2][2],segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_t_36, __pyx_t_37, __pyx_t_38, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1295, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1295, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1295, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_h1 = __pyx_t_23;
          __pyx_v_h2 = __pyx_t_22;
          __pyx_v_h3 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1296
 *                     # line1b-line1a
 *                     [h1,h2,h3]=sub(segment_1_B[0][0],segment_1_B[0][1],segment_1_B[0][2],segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2])
 *                     [h4,h5,h6]=sub(segment_1_B[1][0],segment_1_B[1][1],segment_1_B[1][2],segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2])             # <<<<<<<<<<<<<<
 *                     [h7,h8,h9]=sub(segment_1_B[2][0],segment_1_B[2][1],segment_1_B[2][2],segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2])
 *                     [h10,h11,h12]=sub(segment_1_B[3][0],segment_1_B[3][1],segment_1_B[3][2],segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1296, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1296, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1296, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_h4 = __pyx_t_21;
          __pyx_v_h5 = __pyx_t_22;
          __pyx_v_h6 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1297
 *                     [h1,h2,h3]=sub(segment_1_B[0][0],segment_1_B[0][1],segment_1_B[0][2],segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2])
 *                     [h4,h5,h6]=sub(segment_1_B[1][0],segment_1_B[1][1],segment_1_B[1][2],segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2])
 *                     [h7,h8,h9]=sub(segment_1_B[2][0],segment_1_B[2][1],segment_1_B[2][2],segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2])             # <<<<<<<<<<<<<<
 *                     [h10,h11,h12]=sub(segment_1_B[3][0],segment_1_B[3][1],segment_1_B[3][2],segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2])
 *                     [h13,h14,h15]=sub(segment_1_B[4][0],segment_1_B[4][1],segment_1_B[4][2],segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_t_36, __pyx_t_37, __pyx_t_38, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1297, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1297, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1297, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_h7 = __pyx_t_23;
          __pyx_v_h8 = __pyx_t_22;
          __pyx_v_h9 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1298
 *                     [h4,h5,h6]=sub(segment_1_B[1][0],segment_1_B[1][1],segment_1_B[1][2],segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2])
 *                     [h7,h8,h9]=sub(segment_1_B[2][0],segment_1_B[2][1],segment_1_B[2][2],segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2])
 *                     [h10,h11,h12]=sub(segment_1_B[3][0],segment_1_B[3][1],segment_1_B[3][2],segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2])             # <<<<<<<<<<<<<<
 *                     [h13,h14,h15]=sub(segment_1_B[4][0],segment_1_B[4][1],segment_1_B[4][2],segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2])
 *                     [h16,h17,h18]=sub(segment_1_B[5][0],segment_1_B[5][1],segment_1_B[5][2],segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1298, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1298, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1298, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1298, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_h10 = __pyx_t_21;
          __pyx_v_h11 = __pyx_t_22;
          __pyx_v_h12 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1299
 *                     [h7,h8,h9]=sub(segment_1_B[2][0],segment_1_B[2][1],segment_1_B[2][2],segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2])
 *                     [h10,h11,h12]=sub(segment_1_B[3][0],segment_1_B[3][1],segment_1_B[3][2],segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2])
 *                     [h13,h14,h15]=sub(segment_1_B[4][0],segment_1_B[4][1],segment_1_B[4][2],segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2])             # <<<<<<<<<<<<<<
 *                     [h16,h17,h18]=sub(segment_1_B[5][0],segment_1_B[5][1],segment_1_B[5][2],segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2])
 *                     #
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_t_36, __pyx_t_37, __pyx_t_38, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1299, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1299, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_h13 = __pyx_t_23;
          __pyx_v_h14 = __pyx_t_22;
          __pyx_v_h15 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1300
 *                     [h10,h11,h12]=sub(segment_1_B[3][0],segment_1_B[3][1],segment_1_B[3][2],segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2])
 *                     [h13,h14,h15]=sub(segment_1_B[4][0],segment_1_B[4][1],segment_1_B[4][2],segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2])
 *                     [h16,h17,h18]=sub(segment_1_B[5][0],segment_1_B[5][1],segment_1_B[5][2],segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2])             # <<<<<<<<<<<<<<
 *                     #
 *                     # line1a
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_38 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_38 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_37 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_37 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_B), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_36 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_36 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_24, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_38, __pyx_t_37, __pyx_t_36, __pyx_t_31, __pyx_t_32, __pyx_t_33, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1300, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1300, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1300, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1300, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_h16 = __pyx_t_21;
          __pyx_v_h17 = __pyx_t_22;
          __pyx_v_h18 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1303
 *                     #
 *                     # line1a
 *                     i1,i2,i3=segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2]             # <<<<<<<<<<<<<<
 *                     i4,i5,i6=segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2]
 *                     i7,i8,i9=segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2]
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_i1 = __pyx_t_23;
          __pyx_v_i2 = __pyx_t_22;
          __pyx_v_i3 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1304
 *                     # line1a
 *                     i1,i2,i3=segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2]
 *                     i4,i5,i6=segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2]             # <<<<<<<<<<<<<<
 *                     i7,i8,i9=segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2]
 *                     i10,i11,i12=segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2]
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i4 = __pyx_t_21;
          __pyx_v_i5 = __pyx_t_22;
          __pyx_v_i6 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1305
 *                     i1,i2,i3=segment_1_A[0][0],segment_1_A[0][1],segment_1_A[0][2]
 *                     i4,i5,i6=segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2]
 *                     i7,i8,i9=segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2]             # <<<<<<<<<<<<<<
 *                     i10,i11,i12=segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2]
 *                     i13,i14,i15=segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2]
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_i7 = __pyx_t_23;
          __pyx_v_i8 = __pyx_t_22;
          __pyx_v_i9 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1306
 *                     i4,i5,i6=segment_1_A[1][0],segment_1_A[1][1],segment_1_A[1][2]
 *                     i7,i8,i9=segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2]
 *                     i10,i11,i12=segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2]             # <<<<<<<<<<<<<<
 *                     i13,i14,i15=segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2]
 *                     i16,i17,i18=segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2]
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i10 = __pyx_t_21;
          __pyx_v_i11 = __pyx_t_22;
          __pyx_v_i12 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1307
 *                     i7,i8,i9=segment_1_A[2][0],segment_1_A[2][1],segment_1_A[2][2]
 *                     i10,i11,i12=segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2]
 *                     i13,i14,i15=segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2]             # <<<<<<<<<<<<<<
 *                     i16,i17,i18=segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2]
 *                     #
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_i13 = __pyx_t_23;
          __pyx_v_i14 = __pyx_t_22;
          __pyx_v_i15 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1308
 *                     i10,i11,i12=segment_1_A[3][0],segment_1_A[3][1],segment_1_A[3][2]
 *                     i13,i14,i15=segment_1_A[4][0],segment_1_A[4][1],segment_1_A[4][2]
 *                     i16,i17,i18=segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2]             # <<<<<<<<<<<<<<
 *                     #
 *                     [j1,j2,j3]=mul(s1,s2,s3,h1,h2,h3)
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __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, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_segment_1_A), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_i16 = __pyx_t_21;
          __pyx_v_i17 = __pyx_t_22;
          __pyx_v_i18 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1310
 *                     i16,i17,i18=segment_1_A[5][0],segment_1_A[5][1],segment_1_A[5][2]
 *                     #
 *                     [j1,j2,j3]=mul(s1,s2,s3,h1,h2,h3)             # <<<<<<<<<<<<<<
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)
 *                     #
 */
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_h1, __pyx_v_h2, __pyx_v_h3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1310, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1310, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1310, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j1 = __pyx_t_23;
          __pyx_v_j2 = __pyx_t_22;
          __pyx_v_j3 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1311
 *                     #
 *                     [j1,j2,j3]=mul(s1,s2,s3,h1,h2,h3)
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j4,j5,j6]=mul(s1,s2,s3,h4,h5,h6)
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j1, __pyx_v_j2, __pyx_v_j3, __pyx_v_i1, __pyx_v_i2, __pyx_v_i3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1311, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1311, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1311, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j1 = __pyx_t_21;
          __pyx_v_j2 = __pyx_t_22;
          __pyx_v_j3 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1313
 *                     [j1,j2,j3]=add(j1,j2,j3,i1,i2,i3)
 *                     #
 *                     [j4,j5,j6]=mul(s1,s2,s3,h4,h5,h6)             # <<<<<<<<<<<<<<
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)
 *                     #
 */
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_h4, __pyx_v_h5, __pyx_v_h6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1313, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1313, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j4 = __pyx_t_23;
          __pyx_v_j5 = __pyx_t_22;
          __pyx_v_j6 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1314
 *                     #
 *                     [j4,j5,j6]=mul(s1,s2,s3,h4,h5,h6)
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j7,j8,j9]=mul(s1,s2,s3,h7,h8,h9)
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j4, __pyx_v_j5, __pyx_v_j6, __pyx_v_i4, __pyx_v_i5, __pyx_v_i6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1314, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1314, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1314, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j4 = __pyx_t_21;
          __pyx_v_j5 = __pyx_t_22;
          __pyx_v_j6 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1316
 *                     [j4,j5,j6]=add(j4,j5,j6,i4,i5,i6)
 *                     #
 *                     [j7,j8,j9]=mul(s1,s2,s3,h7,h8,h9)             # <<<<<<<<<<<<<<
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)
 *                     #
 */
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_h7, __pyx_v_h8, __pyx_v_h9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1316, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1316, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j7 = __pyx_t_23;
          __pyx_v_j8 = __pyx_t_22;
          __pyx_v_j9 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1317
 *                     #
 *                     [j7,j8,j9]=mul(s1,s2,s3,h7,h8,h9)
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j10,j11,j12]=mul(s1,s2,s3,h10,h11,h12)
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j7, __pyx_v_j8, __pyx_v_j9, __pyx_v_i7, __pyx_v_i8, __pyx_v_i9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1317, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1317, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1317, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j7 = __pyx_t_21;
          __pyx_v_j8 = __pyx_t_22;
          __pyx_v_j9 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1319
 *                     [j7,j8,j9]=add(j7,j8,j9,i7,i8,i9)
 *                     #
 *                     [j10,j11,j12]=mul(s1,s2,s3,h10,h11,h12)             # <<<<<<<<<<<<<<
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)
 *                     #
 */
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_h10, __pyx_v_h11, __pyx_v_h12, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1319, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1319, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1319, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1319, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1319, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j10 = __pyx_t_23;
          __pyx_v_j11 = __pyx_t_22;
          __pyx_v_j12 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1320
 *                     #
 *                     [j10,j11,j12]=mul(s1,s2,s3,h10,h11,h12)
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j13,j14,j15]=mul(s1,s2,s3,h13,h14,h15)
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j10, __pyx_v_j11, __pyx_v_j12, __pyx_v_i10, __pyx_v_i11, __pyx_v_i12, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1320, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1320, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1320, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1320, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1320, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j10 = __pyx_t_21;
          __pyx_v_j11 = __pyx_t_22;
          __pyx_v_j12 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1322
 *                     [j10,j11,j12]=add(j10,j11,j12,i10,i11,i12)
 *                     #
 *                     [j13,j14,j15]=mul(s1,s2,s3,h13,h14,h15)             # <<<<<<<<<<<<<<
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)
 *                     #
 */
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_33, __pyx_t_32, __pyx_t_31, __pyx_v_h13, __pyx_v_h14, __pyx_v_h15, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1322, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1322, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j13 = __pyx_t_23;
          __pyx_v_j14 = __pyx_t_22;
          __pyx_v_j15 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1323
 *                     #
 *                     [j13,j14,j15]=mul(s1,s2,s3,h13,h14,h15)
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)             # <<<<<<<<<<<<<<
 *                     #
 *                     [j16,j17,j18]=mul(s1,s2,s3,h16,h17,h18)
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j13, __pyx_v_j14, __pyx_v_j15, __pyx_v_i13, __pyx_v_i14, __pyx_v_i15, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1323, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1323, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1323, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j13 = __pyx_t_21;
          __pyx_v_j14 = __pyx_t_22;
          __pyx_v_j15 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1325
 *                     [j13,j14,j15]=add(j13,j14,j15,i13,i14,i15)
 *                     #
 *                     [j16,j17,j18]=mul(s1,s2,s3,h16,h17,h18)             # <<<<<<<<<<<<<<
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)
 *                     tmp1a=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])
 */
          __pyx_t_31 = __Pyx_PyInt_As_long(__pyx_v_s1); if (unlikely((__pyx_t_31 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __pyx_t_32 = __Pyx_PyInt_As_long(__pyx_v_s2); if (unlikely((__pyx_t_32 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __pyx_t_33 = __Pyx_PyInt_As_long(__pyx_v_s3); if (unlikely((__pyx_t_33 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_v_h16, __pyx_v_h17, __pyx_v_h18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1325, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_24 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_24);
            #else
            __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1325, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1325, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1325, __pyx_L1_error)
          }
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_v_j16 = __pyx_t_23;
          __pyx_v_j17 = __pyx_t_22;
          __pyx_v_j18 = __pyx_t_21;

          /* "pyqcstrc/icosah/intsct.pyx":1326
 *                     #
 *                     [j16,j17,j18]=mul(s1,s2,s3,h16,h17,h18)
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)             # <<<<<<<<<<<<<<
 *                     tmp1a=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])
 *                     #if verbose>2:
 */
          __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_j16, __pyx_v_j17, __pyx_v_j18, __pyx_v_i16, __pyx_v_i17, __pyx_v_i18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(__pyx_t_4 != Py_None)) {
            PyObject* sequence = __pyx_t_4;
            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(0, 1326, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_24 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_24);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1326, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1326, __pyx_L1_error)
          }
          __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_24); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_j16 = __pyx_t_21;
          __pyx_v_j17 = __pyx_t_22;
          __pyx_v_j18 = __pyx_t_23;

          /* "pyqcstrc/icosah/intsct.pyx":1327
 *                     [j16,j17,j18]=mul(s1,s2,s3,h16,h17,h18)
 *                     [j16,j17,j18]=add(j16,j17,j18,i16,i17,i18)
 *                     tmp1a=np.array([j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18])             # <<<<<<<<<<<<<<
 *                     #if verbose>2:
 *                     #    print(tmp1a)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_j1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_24 = __Pyx_PyInt_From_long(__pyx_v_j2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_24);
          __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_j3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_j4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_j5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_27 = __Pyx_PyInt_From_long(__pyx_v_j6); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_j7); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_j8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_j9); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __pyx_t_39 = __Pyx_PyInt_From_long(__pyx_v_j10); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_39);
          __pyx_t_40 = __Pyx_PyInt_From_long(__pyx_v_j11); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_40);
          __pyx_t_41 = __Pyx_PyInt_From_long(__pyx_v_j12); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_41);
          __pyx_t_42 = __Pyx_PyInt_From_long(__pyx_v_j13); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_42);
          __pyx_t_43 = __Pyx_PyInt_From_long(__pyx_v_j14); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_43);
          __pyx_t_44 = __Pyx_PyInt_From_long(__pyx_v_j15); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_44);
          __pyx_t_45 = __Pyx_PyInt_From_long(__pyx_v_j16); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_45);
          __pyx_t_46 = __Pyx_PyInt_From_long(__pyx_v_j17); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_46);
          __pyx_t_47 = __Pyx_PyInt_From_long(__pyx_v_j18); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_47);
          __pyx_t_48 = PyList_New(18); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_48);
          __Pyx_GIVEREF(__pyx_t_5);
          PyList_SET_ITEM(__pyx_t_48, 0, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_24);
          PyList_SET_ITEM(__pyx_t_48, 1, __pyx_t_24);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_48, 2, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_6);
          PyList_SET_ITEM(__pyx_t_48, 3, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_7);
          PyList_SET_ITEM(__pyx_t_48, 4, __pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_27);
          PyList_SET_ITEM(__pyx_t_48, 5, __pyx_t_27);
          __Pyx_GIVEREF(__pyx_t_25);
          PyList_SET_ITEM(__pyx_t_48, 6, __pyx_t_25);
          __Pyx_GIVEREF(__pyx_t_8);
          PyList_SET_ITEM(__pyx_t_48, 7, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_26);
          PyList_SET_ITEM(__pyx_t_48, 8, __pyx_t_26);
          __Pyx_GIVEREF(__pyx_t_39);
          PyList_SET_ITEM(__pyx_t_48, 9, __pyx_t_39);
          __Pyx_GIVEREF(__pyx_t_40);
          PyList_SET_ITEM(__pyx_t_48, 10, __pyx_t_40);
          __Pyx_GIVEREF(__pyx_t_41);
          PyList_SET_ITEM(__pyx_t_48, 11, __pyx_t_41);
          __Pyx_GIVEREF(__pyx_t_42);
          PyList_SET_ITEM(__pyx_t_48, 12, __pyx_t_42);
          __Pyx_GIVEREF(__pyx_t_43);
          PyList_SET_ITEM(__pyx_t_48, 13, __pyx_t_43);
          __Pyx_GIVEREF(__pyx_t_44);
          PyList_SET_ITEM(__pyx_t_48, 14, __pyx_t_44);
          __Pyx_GIVEREF(__pyx_t_45);
          PyList_SET_ITEM(__pyx_t_48, 15, __pyx_t_45);
          __Pyx_GIVEREF(__pyx_t_46);
          PyList_SET_ITEM(__pyx_t_48, 16, __pyx_t_46);
          __Pyx_GIVEREF(__pyx_t_47);
          PyList_SET_ITEM(__pyx_t_48, 17, __pyx_t_47);
          __pyx_t_5 = 0;
          __pyx_t_24 = 0;
          __pyx_t_2 = 0;
          __pyx_t_6 = 0;
          __pyx_t_7 = 0;
          __pyx_t_27 = 0;
          __pyx_t_25 = 0;
          __pyx_t_8 = 0;
          __pyx_t_26 = 0;
          __pyx_t_39 = 0;
          __pyx_t_40 = 0;
          __pyx_t_41 = 0;
          __pyx_t_42 = 0;
          __pyx_t_43 = 0;
          __pyx_t_44 = 0;
          __pyx_t_45 = 0;
          __pyx_t_46 = 0;
          __pyx_t_47 = 0;
          __pyx_t_47 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_47 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_47)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_47);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_4 = (__pyx_t_47) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_47, __pyx_t_48) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_48);
          __Pyx_XDECREF(__pyx_t_47); __pyx_t_47 = 0;
          __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1327, __pyx_L1_error)
          __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
              }
              __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1327, __pyx_L1_error)
          }
          __pyx_t_28 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1290
 *                 #if ddx**2+ddy**2+ddz**2<EPS:
 *                 #if ddx1==0 and ddx2==0 and ddy1==0 and ddy2==0 and ddz1==0 and ddz2==0:
 *                 if z1==0 and z2==0:             # <<<<<<<<<<<<<<
 *                     #
 *                     #interval=line1a+s*(line1b-line1a)
 */
          goto __pyx_L22;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1333
 *                     #    pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
        }
        __pyx_L22:;

        /* "pyqcstrc/icosah/intsct.pyx":1244
 *             else:
 *                 pass
 *             if s>=0.0 and s<=1.0 and t>=0.0 and t<=1.0:             # <<<<<<<<<<<<<<
 *                 # ddx=(L2ax-L1ax)-s*(L1bx-L1ax)+t*(L2bx-L2ax)
 *                 #bx1,bx2,bx3 # (L2ax-L1ax)
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1335
 *                     pass
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/intsct.pyx":1237
 *         else:
 *             pass
 *         if c1!=0 or c2!=0:             # <<<<<<<<<<<<<<
 *             t1,t2,t3=div(h1,h2,h3,c1,c2,c3)
 *             t=(t1+TAU*t2)/t3
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1337
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/intsct.pyx":1217
 *     p1,p2,p3=sub(m1,m2,m3,n1,n2,n3)
 *     tmp1a=np.array([0])
 *     if p1!=0 or p2!=0:             # <<<<<<<<<<<<<<
 *         # bunshi=dot_product(vecAC,vecCD)*dot_product(vecCD,vecAB)-dot_product(vecCD,vecCD)*dot_product(vecAC,vecAB)
 *         m1,m2,m3=mul(a1,a2,a3,b1,b2,b3)
 */
    goto __pyx_L5;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1339
 *             pass
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     return tmp1a
 * 
 */
  /*else*/ {
  }
  __pyx_L5:;

  /* "pyqcstrc/icosah/intsct.pyx":1340
 *     else:
 *         pass
 *     return tmp1a             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
  __pyx_r = ((PyArrayObject *)__pyx_v_tmp1a);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1139
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray intersection_two_segment(np.ndarray[DTYPE_int_t, ndim=2] segment_1_A,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=2] segment_1_B,
 *                                         np.ndarray[DTYPE_int_t, ndim=2] segment_2_C,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_39);
  __Pyx_XDECREF(__pyx_t_40);
  __Pyx_XDECREF(__pyx_t_41);
  __Pyx_XDECREF(__pyx_t_42);
  __Pyx_XDECREF(__pyx_t_43);
  __Pyx_XDECREF(__pyx_t_44);
  __Pyx_XDECREF(__pyx_t_45);
  __Pyx_XDECREF(__pyx_t_46);
  __Pyx_XDECREF(__pyx_t_47);
  __Pyx_XDECREF(__pyx_t_48);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.intersection_two_segment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1ai3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg1bi3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2ci3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seg2di3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1_A.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_1_B.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2_C.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_segment_2_D.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1ai1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1ai2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1ai3);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1bi1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1bi2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg1bi3);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2ci1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2ci2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2ci3);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2di1);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2di2);
  __Pyx_XDECREF((PyObject *)__pyx_v_seg2di3);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_s1);
  __Pyx_XDECREF(__pyx_v_s2);
  __Pyx_XDECREF(__pyx_v_s3);
  __Pyx_XDECREF(__pyx_v_t1);
  __Pyx_XDECREF(__pyx_v_t2);
  __Pyx_XDECREF(__pyx_v_t3);
  __Pyx_XDECREF(__pyx_v_ddy1);
  __Pyx_XDECREF(__pyx_v_ddy2);
  __Pyx_XDECREF(__pyx_v_ddy3);
  __Pyx_XDECREF(__pyx_v_ddz1);
  __Pyx_XDECREF(__pyx_v_ddz2);
  __Pyx_XDECREF(__pyx_v_ddz3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1344
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization_points(np.ndarray[DTYPE_int_t, ndim=3] points,             # <<<<<<<<<<<<<<
 *                                             int verbose):
 *     cdef int i,num,counter
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_11tetrahedralization_points(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(PyArrayObject *__pyx_v_points, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int __pyx_v_counter;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  double __pyx_v_vx;
  double __pyx_v_vy;
  double __pyx_v_vz;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_xi = 0;
  PyArrayObject *__pyx_v_yi = 0;
  PyArrayObject *__pyx_v_zi = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp1v = 0;
  PyArrayObject *__pyx_v_tmp2v = 0;
  PyObject *__pyx_v_ltmp = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_points;
  __Pyx_Buffer __pyx_pybuffer_points;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1v;
  __Pyx_Buffer __pyx_pybuffer_tmp1v;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2v;
  __Pyx_Buffer __pyx_pybuffer_tmp2v;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3b;
  __Pyx_Buffer __pyx_pybuffer_tmp3b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_xi;
  __Pyx_Buffer __pyx_pybuffer_xi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_yi;
  __Pyx_Buffer __pyx_pybuffer_yi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_zi;
  __Pyx_Buffer __pyx_pybuffer_zi;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __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;
  PyArrayObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __pyx_t_5numpy_float64_t __pyx_t_19;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_20;
  PyArrayObject *__pyx_t_21 = NULL;
  PyArrayObject *__pyx_t_22 = NULL;
  PyArrayObject *__pyx_t_23 = NULL;
  PyArrayObject *__pyx_t_24 = NULL;
  long __pyx_t_25;
  long __pyx_t_26;
  long __pyx_t_27;
  int __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_UCS4 __pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tetrahedralization_points", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_xi.pybuffer.buf = NULL;
  __pyx_pybuffer_xi.refcount = 0;
  __pyx_pybuffernd_xi.data = NULL;
  __pyx_pybuffernd_xi.rcbuffer = &__pyx_pybuffer_xi;
  __pyx_pybuffer_yi.pybuffer.buf = NULL;
  __pyx_pybuffer_yi.refcount = 0;
  __pyx_pybuffernd_yi.data = NULL;
  __pyx_pybuffernd_yi.rcbuffer = &__pyx_pybuffer_yi;
  __pyx_pybuffer_zi.pybuffer.buf = NULL;
  __pyx_pybuffer_zi.refcount = 0;
  __pyx_pybuffernd_zi.data = NULL;
  __pyx_pybuffernd_zi.rcbuffer = &__pyx_pybuffer_zi;
  __pyx_pybuffer_tmp3a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3a.refcount = 0;
  __pyx_pybuffernd_tmp3a.data = NULL;
  __pyx_pybuffernd_tmp3a.rcbuffer = &__pyx_pybuffer_tmp3a;
  __pyx_pybuffer_tmp3b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3b.refcount = 0;
  __pyx_pybuffernd_tmp3b.data = NULL;
  __pyx_pybuffernd_tmp3b.rcbuffer = &__pyx_pybuffer_tmp3b;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tmp1v.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1v.refcount = 0;
  __pyx_pybuffernd_tmp1v.data = NULL;
  __pyx_pybuffernd_tmp1v.rcbuffer = &__pyx_pybuffer_tmp1v;
  __pyx_pybuffer_tmp2v.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2v.refcount = 0;
  __pyx_pybuffernd_tmp2v.data = NULL;
  __pyx_pybuffernd_tmp2v.rcbuffer = &__pyx_pybuffer_tmp2v;
  __pyx_pybuffer_points.pybuffer.buf = NULL;
  __pyx_pybuffer_points.refcount = 0;
  __pyx_pybuffernd_points.data = NULL;
  __pyx_pybuffernd_points.rcbuffer = &__pyx_pybuffer_points;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_points.rcbuffer->pybuffer, (PyObject*)__pyx_v_points, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1344, __pyx_L1_error)
  }
  __pyx_pybuffernd_points.diminfo[0].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_points.diminfo[0].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_points.diminfo[1].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_points.diminfo[1].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_points.diminfo[2].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_points.diminfo[2].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/intsct.pyx":1357
 *     cdef list ltmp
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           tetrahedralization_points()')
 *         print('            N of points: %3d :'%(len(points)))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1358
 * 
 *     if verbose>0:
 *         print('           tetrahedralization_points()')             # <<<<<<<<<<<<<<
 *         print('            N of points: %3d :'%(len(points)))
 *     else:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1359
 *     if verbose>0:
 *         print('           tetrahedralization_points()')
 *         print('            N of points: %3d :'%(len(points)))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_points)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1359, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_N_of_points_3d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1357
 *     cdef list ltmp
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           tetrahedralization_points()')
 *         print('            N of points: %3d :'%(len(points)))
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1361
 *         print('            N of points: %3d :'%(len(points)))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp3a=points
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":1363
 *         pass
 * 
 *     tmp3a=points             # <<<<<<<<<<<<<<
 *     for i in range(len(tmp3a)):
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 */
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_points), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
      __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
    }
    __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1363, __pyx_L1_error)
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_points));
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_v_points);

  /* "pyqcstrc/icosah/intsct.pyx":1364
 * 
 *     tmp3a=points
 *     for i in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 *         _,_,_,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1364, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_9; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pyqcstrc/icosah/intsct.pyx":1366
 *     for i in range(len(tmp3a)):
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 *         _,_,_,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])             # <<<<<<<<<<<<<<
 *         #vx=(xi[0]+xi[1]*TAU)/float(xi[2]) # numeric value of xi
 *         #vy=(yi[0]+yi[1]*TAU)/float(yi[2])
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_2, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_10), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_13), ((PyArrayObject *)__pyx_t_14), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (likely(__pyx_t_2 != Py_None)) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 6)) {
        if (size > 6) __Pyx_RaiseTooManyValuesError(6);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1366, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_13 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_12 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_11 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_10 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 5); 
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_4);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[6] = {&__pyx_t_14,&__pyx_t_13,&__pyx_t_12,&__pyx_t_11,&__pyx_t_10,&__pyx_t_4};
        for (i=0; i < 6; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1366, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1366, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_14);
    __pyx_t_14 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_13);
    __pyx_t_13 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_12);
    __pyx_t_12 = 0;
    __pyx_t_15 = ((PyArrayObject *)__pyx_t_11);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
      __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xi.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_16 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xi.rcbuffer->pybuffer, (PyObject*)__pyx_v_xi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
        }
        __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_xi.diminfo[0].strides = __pyx_pybuffernd_xi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xi.diminfo[0].shape = __pyx_pybuffernd_xi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
    }
    __pyx_t_15 = 0;
    __Pyx_XDECREF_SET(__pyx_v_xi, ((PyArrayObject *)__pyx_t_11));
    __pyx_t_11 = 0;
    __pyx_t_15 = ((PyArrayObject *)__pyx_t_10);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
      __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yi.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_16 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yi.rcbuffer->pybuffer, (PyObject*)__pyx_v_yi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        }
        __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
      }
      __pyx_pybuffernd_yi.diminfo[0].strides = __pyx_pybuffernd_yi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yi.diminfo[0].shape = __pyx_pybuffernd_yi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
    }
    __pyx_t_15 = 0;
    __Pyx_XDECREF_SET(__pyx_v_yi, ((PyArrayObject *)__pyx_t_10));
    __pyx_t_10 = 0;
    __pyx_t_15 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
      __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zi.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_16 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zi.rcbuffer->pybuffer, (PyObject*)__pyx_v_zi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
        }
        __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
      }
      __pyx_pybuffernd_zi.diminfo[0].strides = __pyx_pybuffernd_zi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_zi.diminfo[0].shape = __pyx_pybuffernd_zi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
    }
    __pyx_t_15 = 0;
    __Pyx_XDECREF_SET(__pyx_v_zi, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1370
 *         #vy=(yi[0]+yi[1]*TAU)/float(yi[2])
 *         #vz=(zi[0]+zi[1]*TAU)/float(zi[2])
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi             # <<<<<<<<<<<<<<
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 */
    __pyx_t_17 = 0;
    __pyx_t_18 = 1;
    __pyx_t_19 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_xi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_18 = 2;
    __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_xi.diminfo[0].strides));
    if (unlikely(__pyx_t_20 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1370, __pyx_L1_error)
    }
    __pyx_v_vx = (__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_t_20));

    /* "pyqcstrc/icosah/intsct.pyx":1371
 *         #vz=(zi[0]+zi[1]*TAU)/float(zi[2])
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]             # <<<<<<<<<<<<<<
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:
 */
    __pyx_t_18 = 0;
    __pyx_t_17 = 1;
    __pyx_t_19 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_yi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_17 = 2;
    __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_yi.diminfo[0].strides));
    if (unlikely(__pyx_t_20 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1371, __pyx_L1_error)
    }
    __pyx_v_vy = (__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_t_20));

    /* "pyqcstrc/icosah/intsct.pyx":1372
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]             # <<<<<<<<<<<<<<
 *         if i==0:
 *             tmp1v=np.array([vx,vy,vz])
 */
    __pyx_t_17 = 0;
    __pyx_t_18 = 1;
    __pyx_t_19 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_zi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_zi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_18 = 2;
    __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_zi.diminfo[0].strides));
    if (unlikely(__pyx_t_20 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1372, __pyx_L1_error)
    }
    __pyx_v_vz = (__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_t_20));

    /* "pyqcstrc/icosah/intsct.pyx":1373
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:             # <<<<<<<<<<<<<<
 *             tmp1v=np.array([vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 */
    __pyx_t_1 = ((__pyx_v_i == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1374
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:
 *             tmp1v=np.array([vx,vy,vz])             # <<<<<<<<<<<<<<
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *         else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyFloat_FromDouble(__pyx_v_vy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PyFloat_FromDouble(__pyx_v_vz); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = PyList_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_13, 2, __pyx_t_12);
      __pyx_t_4 = 0;
      __pyx_t_11 = 0;
      __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_13);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1374, __pyx_L1_error)
      __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
        __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_16 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
          }
          __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
        }
        __pyx_pybuffernd_tmp1v.diminfo[0].strides = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1v.diminfo[0].shape = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1374, __pyx_L1_error)
      }
      __pyx_t_21 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1v, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1373
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:             # <<<<<<<<<<<<<<
 *             tmp1v=np.array([vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1377
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *         else:
 *             tmp1v=np.append(tmp1v,[vx,vy,vz])             # <<<<<<<<<<<<<<
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_append); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyFloat_FromDouble(__pyx_v_vx); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = PyFloat_FromDouble(__pyx_v_vy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = PyFloat_FromDouble(__pyx_v_vz); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_10);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_11);
      __pyx_t_10 = 0;
      __pyx_t_12 = 0;
      __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1v), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1v), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1v));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1v));
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1v));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_16, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1377, __pyx_L1_error)
      __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
        __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_16 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
          }
          __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
        }
        __pyx_pybuffernd_tmp1v.diminfo[0].strides = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1v.diminfo[0].shape = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1377, __pyx_L1_error)
      }
      __pyx_t_21 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1v, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;
    }
    __pyx_L6:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1379
 *             tmp1v=np.append(tmp1v,[vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)             # <<<<<<<<<<<<<<
 *     ltmp=decomposition(tmp2v)
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1v), __pyx_n_s_reshape); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_tmp1v)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1379, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyInt_FromDouble((((double)__pyx_t_3) / 3.0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && 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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_5, __pyx_t_12);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_int_3);
    __pyx_t_12 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1379, __pyx_L1_error)
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
      __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
    }
    __pyx_pybuffernd_tmp2v.diminfo[0].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2v.diminfo[0].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2v.diminfo[1].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2v.diminfo[1].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1379, __pyx_L1_error)
  }
  __pyx_t_22 = 0;
  __pyx_v_tmp2v = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1380
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)
 *     ltmp=decomposition(tmp2v)             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_6intsct_decomposition(((PyArrayObject *)__pyx_v_tmp2v)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ltmp = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1382
 *     ltmp=decomposition(tmp2v)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            -> N of tetrahedron: %3d'%(len(ltmp)))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1383
 * 
 *     if verbose>0:
 *         print('            -> N of tetrahedron: %3d'%(len(ltmp)))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    if (unlikely(__pyx_v_ltmp == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1383, __pyx_L1_error)
    }
    __pyx_t_3 = PyList_GET_SIZE(__pyx_v_ltmp); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1383, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_N_of_tetrahedron_3d, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1382
 *     ltmp=decomposition(tmp2v)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            -> N of tetrahedron: %3d'%(len(ltmp)))
 *     else:
 */
    goto __pyx_L7;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1385
 *         print('            -> N of tetrahedron: %3d'%(len(ltmp)))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp4a=np.array([[[[0]]]])
 */
  /*else*/ {
  }
  __pyx_L7:;

  /* "pyqcstrc/icosah/intsct.pyx":1387
 *         pass
 * 
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     if ltmp!=[0]:
 *         #w1,w2,w3=0,0,1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_int_0);
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
  __pyx_t_13 = 0;
  __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_12);
  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
  __pyx_t_12 = 0;
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
  __pyx_t_13 = 0;
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1387, __pyx_L1_error)
  __pyx_t_23 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
      __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
    }
    __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1387, __pyx_L1_error)
  }
  __pyx_t_23 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1388
 * 
 *     tmp4a=np.array([[[[0]]]])
 *     if ltmp!=[0]:             # <<<<<<<<<<<<<<
 *         #w1,w2,w3=0,0,1
 *         counter=0
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_11 = PyObject_RichCompare(__pyx_v_ltmp, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1390
 *     if ltmp!=[0]:
 *         #w1,w2,w3=0,0,1
 *         counter=0             # <<<<<<<<<<<<<<
 *         for i in range(len(ltmp)):
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 */
    __pyx_v_counter = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1391
 *         #w1,w2,w3=0,0,1
 *         counter=0
 *         for i in range(len(ltmp)):             # <<<<<<<<<<<<<<
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 *             #print 'tmp3b',tmp3b
 */
    if (unlikely(__pyx_v_ltmp == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1391, __pyx_L1_error)
    }
    __pyx_t_3 = PyList_GET_SIZE(__pyx_v_ltmp); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1391, __pyx_L1_error)
    __pyx_t_9 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_9; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pyqcstrc/icosah/intsct.pyx":1392
 *         counter=0
 *         for i in range(len(ltmp)):
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             #print 'tmp3b',tmp3b
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1392, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1392, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1392, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1392, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_13);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_10);
      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_14);
      PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_14);
      __pyx_t_13 = 0;
      __pyx_t_4 = 0;
      __pyx_t_10 = 0;
      __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1392, __pyx_L1_error)
      __pyx_t_24 = ((PyArrayObject *)__pyx_t_11);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_16 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
          }
          __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
        }
        __pyx_pybuffernd_tmp3b.diminfo[0].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3b.diminfo[0].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3b.diminfo[1].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3b.diminfo[1].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3b.diminfo[2].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3b.diminfo[2].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1392, __pyx_L1_error)
      }
      __pyx_t_24 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_11));
      __pyx_t_11 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1394
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 *             #print 'tmp3b',tmp3b
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)             # <<<<<<<<<<<<<<
 *             if v1==0 and v2==0:
 *                 if verbose>0:
 */
      __pyx_t_11 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tmp3b), 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (likely(__pyx_t_11 != Py_None)) {
        PyObject* sequence = __pyx_t_11;
        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(0, 1394, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_14);
        #else
        __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        #endif
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1394, __pyx_L1_error)
      }
      __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_12); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_27 = __Pyx_PyInt_As_long(__pyx_t_14); if (unlikely((__pyx_t_27 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_v_v1 = __pyx_t_25;
      __pyx_v_v2 = __pyx_t_26;
      __pyx_v_v3 = __pyx_t_27;

      /* "pyqcstrc/icosah/intsct.pyx":1395
 *             #print 'tmp3b',tmp3b
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('            %d-th tet, empty'%(i))
 */
      __pyx_t_28 = ((__pyx_v_v1 == 0) != 0);
      if (__pyx_t_28) {
      } else {
        __pyx_t_1 = __pyx_t_28;
        goto __pyx_L12_bool_binop_done;
      }
      __pyx_t_28 = ((__pyx_v_v2 == 0) != 0);
      __pyx_t_1 = __pyx_t_28;
      __pyx_L12_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1396
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('            %d-th tet, empty'%(i))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1397
 *             if v1==0 and v2==0:
 *                 if verbose>0:
 *                     print('            %d-th tet, empty'%(i))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_14 = PyUnicode_Format(__pyx_kp_u_d_th_tet_empty, __pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1396
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('            %d-th tet, empty'%(i))
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1399
 *                     print('            %d-th tet, empty'%(i))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 pass
 *             #elif (v1+v2*TAU)/float(v3)<0.0:
 */
        /*else*/ {
        }
        __pyx_L14:;

        /* "pyqcstrc/icosah/intsct.pyx":1395
 *             #print 'tmp3b',tmp3b
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('            %d-th tet, empty'%(i))
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1405
 *             #    pass
 *             else:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     if verbose>0:
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1406
 *             else:
 *                 if counter==0:
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72             # <<<<<<<<<<<<<<
 *                     if verbose>0:
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 */
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_14, function);
            }
          }
          __pyx_t_11 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1406, __pyx_L1_error)
          __pyx_t_15 = ((PyArrayObject *)__pyx_t_11);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_16 < 0)) {
              PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
              }
              __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1406, __pyx_L1_error)
          }
          __pyx_t_15 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
          __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1407
 *                 if counter==0:
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":1408
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     if verbose>0:
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_11 = PyTuple_New(11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_29 = 0;
            __pyx_t_30 = 127;
            __Pyx_INCREF(__pyx_kp_u__21);
            __pyx_t_29 += 12;
            __Pyx_GIVEREF(__pyx_kp_u__21);
            PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u__21);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u_th_tet_volume);
            __pyx_t_29 += 18;
            __Pyx_GIVEREF(__pyx_kp_u_th_tet_volume);
            PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_th_tet_volume);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_kp_u__5);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_kp_u__5);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__6);
            __pyx_t_29 += 2;
            __Pyx_GIVEREF(__pyx_kp_u__6);
            PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_kp_u__6);
            __pyx_t_19 = (__pyx_v_v1 + (__pyx_v_v2 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
            if (unlikely(__pyx_v_v3 == 0)) {
              PyErr_SetString(PyExc_ZeroDivisionError, "float division");
              __PYX_ERR(0, 1408, __pyx_L1_error)
            }
            __pyx_t_14 = PyFloat_FromDouble((__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_14, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_30;
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_11, 9, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_kp_u__7);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__7);
            PyTuple_SET_ITEM(__pyx_t_11, 10, __pyx_kp_u__7);
            __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_11, 11, __pyx_t_29, __pyx_t_30); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1408, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":1407
 *                 if counter==0:
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyqcstrc/icosah/intsct.pyx":1410
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3b)
 */
          /*else*/ {
          }
          __pyx_L16:;

          /* "pyqcstrc/icosah/intsct.pyx":1405
 *             #    pass
 *             else:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     if verbose>0:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1412
 *                         pass
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3b)             # <<<<<<<<<<<<<<
 *                     if verbose>0:
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_16 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_14, function);
              __pyx_t_16 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_14)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3b)};
            __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1412, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_11);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3b)};
            __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1412, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_11);
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1412, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp3b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3b));
            PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_16, ((PyObject *)__pyx_v_tmp3b));
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1412, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1412, __pyx_L1_error)
          __pyx_t_15 = ((PyArrayObject *)__pyx_t_11);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_16 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
              }
              __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1412, __pyx_L1_error)
          }
          __pyx_t_15 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
          __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1413
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3b)
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/intsct.pyx":1414
 *                     tmp1a=np.append(tmp1a,tmp3b)
 *                     if verbose>0:
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_11 = PyTuple_New(11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_29 = 0;
            __pyx_t_30 = 127;
            __Pyx_INCREF(__pyx_kp_u__21);
            __pyx_t_29 += 12;
            __Pyx_GIVEREF(__pyx_kp_u__21);
            PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u__21);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u_th_tet_volume);
            __pyx_t_29 += 18;
            __Pyx_GIVEREF(__pyx_kp_u_th_tet_volume);
            PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_th_tet_volume);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_kp_u__5);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_kp_u__5);
            __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_t_14);
            __pyx_t_14 = 0;
            __Pyx_INCREF(__pyx_kp_u__6);
            __pyx_t_29 += 2;
            __Pyx_GIVEREF(__pyx_kp_u__6);
            PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_kp_u__6);
            __pyx_t_19 = (__pyx_v_v1 + (__pyx_v_v2 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
            if (unlikely(__pyx_v_v3 == 0)) {
              PyErr_SetString(PyExc_ZeroDivisionError, "float division");
              __PYX_ERR(0, 1414, __pyx_L1_error)
            }
            __pyx_t_14 = PyFloat_FromDouble((__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_14, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_30;
            __pyx_t_29 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_12);
            PyTuple_SET_ITEM(__pyx_t_11, 9, __pyx_t_12);
            __pyx_t_12 = 0;
            __Pyx_INCREF(__pyx_kp_u__7);
            __pyx_t_29 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__7);
            PyTuple_SET_ITEM(__pyx_t_11, 10, __pyx_kp_u__7);
            __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 11, __pyx_t_29, __pyx_t_30); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1414, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

            /* "pyqcstrc/icosah/intsct.pyx":1413
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3b)
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 */
            goto __pyx_L17;
          }

          /* "pyqcstrc/icosah/intsct.pyx":1416
 *                         print('            %d-th tet, volume : %d %d %d (%8.6f)'%(i,v1,v2,v3,(v1+v2*TAU)/v3))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1
 */
          /*else*/ {
          }
          __pyx_L17:;
        }
        __pyx_L15:;

        /* "pyqcstrc/icosah/intsct.pyx":1418
 *                         pass
 *                 #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1             # <<<<<<<<<<<<<<
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 */
        __pyx_v_counter = (__pyx_v_counter + 1);
      }
      __pyx_L11:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1419
 *                 #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1
 *         if counter!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 */
    __pyx_t_1 = ((__pyx_v_counter != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1420
 *                 counter+=1
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1420, __pyx_L1_error)
      __pyx_t_14 = __Pyx_PyInt_FromDouble((((double)__pyx_t_3) / 72.0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_5 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_t_14);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_5, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_5, __pyx_int_3);
        __pyx_t_14 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1420, __pyx_L1_error)
      __pyx_t_23 = ((PyArrayObject *)__pyx_t_11);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_5 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
          }
          __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0;
        }
        __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1420, __pyx_L1_error)
      }
      __pyx_t_23 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_11));
      __pyx_t_11 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1421
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 print('            -> Total : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1422
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 *                 w1,w2,w3=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *                 print('            -> Total : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 *             else:
 */
        __pyx_t_11 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (likely(__pyx_t_11 != Py_None)) {
          PyObject* sequence = __pyx_t_11;
          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(0, 1422, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_14);
          #else
          __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          #endif
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1422, __pyx_L1_error)
        }
        __pyx_t_27 = __Pyx_PyInt_As_long(__pyx_t_12); if (unlikely((__pyx_t_27 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_10); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_14); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_v_w1 = __pyx_t_27;
        __pyx_v_w2 = __pyx_t_26;
        __pyx_v_w3 = __pyx_t_25;

        /* "pyqcstrc/icosah/intsct.pyx":1423
 *             if verbose>0:
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 print('            -> Total : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_3 = 0;
        __pyx_t_30 = 127;
        __Pyx_INCREF(__pyx_kp_u_Total);
        __pyx_t_3 += 23;
        __Pyx_GIVEREF(__pyx_kp_u_Total);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Total);
        __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_w1, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_3 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u__5);
        __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_w2, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_3 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_kp_u__5);
        __pyx_t_14 = __Pyx_PyUnicode_From_long(__pyx_v_w3, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_3 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_kp_u__6);
        __pyx_t_19 = (__pyx_v_w1 + (__pyx_v_w2 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
        if (unlikely(__pyx_v_w3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1423, __pyx_L1_error)
        }
        __pyx_t_14 = PyFloat_FromDouble((__pyx_t_19 / ((__pyx_t_5numpy_float64_t)__pyx_v_w3))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_14, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_30;
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_3 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_kp_u__7);
        __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_11, 9, __pyx_t_3, __pyx_t_30); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1421
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 print('            -> Total : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 */
        goto __pyx_L19;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1425
 *                 print('            -> Total : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L19:;

      /* "pyqcstrc/icosah/intsct.pyx":1419
 *                 #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1
 *         if counter!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 */
      goto __pyx_L18;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1427
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *             #tmp4a=np.array([[[[0]]]])
 *         #return tmp4a
 */
    /*else*/ {
    }
    __pyx_L18:;

    /* "pyqcstrc/icosah/intsct.pyx":1388
 * 
 *     tmp4a=np.array([[[[0]]]])
 *     if ltmp!=[0]:             # <<<<<<<<<<<<<<
 *         #w1,w2,w3=0,0,1
 *         counter=0
 */
    goto __pyx_L8;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1431
 *         #return tmp4a
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *         #print('tmp2v',tmp2v)
 *         #return np.array([[[[0]]]])
 */
  /*else*/ {
  }
  __pyx_L8:;

  /* "pyqcstrc/icosah/intsct.pyx":1435
 *         #return np.array([[[[0]]]])
 *         #return tmp4a
 *     return tmp4a             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
  __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1344
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization_points(np.ndarray[DTYPE_int_t, ndim=3] points,             # <<<<<<<<<<<<<<
 *                                             int verbose):
 *     cdef int i,num,counter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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_XDECREF(__pyx_t_14);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_xi);
  __Pyx_XDECREF((PyObject *)__pyx_v_yi);
  __Pyx_XDECREF((PyObject *)__pyx_v_zi);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1v);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2v);
  __Pyx_XDECREF(__pyx_v_ltmp);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_11tetrahedralization_points(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_11tetrahedralization_points(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_points = 0;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tetrahedralization_points (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_points,&__pyx_n_s_verbose,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_points)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tetrahedralization_points", 1, 2, 2, 1); __PYX_ERR(0, 1344, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tetrahedralization_points") < 0)) __PYX_ERR(0, 1344, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_points = ((PyArrayObject *)values[0]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tetrahedralization_points", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1344, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_points), __pyx_ptype_5numpy_ndarray, 1, "points", 0))) __PYX_ERR(0, 1344, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_10tetrahedralization_points(__pyx_self, __pyx_v_points, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_10tetrahedralization_points(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_points, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_points;
  __Pyx_Buffer __pyx_pybuffer_points;
  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("tetrahedralization_points", 0);
  __pyx_pybuffer_points.pybuffer.buf = NULL;
  __pyx_pybuffer_points.refcount = 0;
  __pyx_pybuffernd_points.data = NULL;
  __pyx_pybuffernd_points.rcbuffer = &__pyx_pybuffer_points;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_points.rcbuffer->pybuffer, (PyObject*)__pyx_v_points, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1344, __pyx_L1_error)
  }
  __pyx_pybuffernd_points.diminfo[0].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_points.diminfo[0].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_points.diminfo[1].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_points.diminfo[1].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_points.diminfo[2].strides = __pyx_pybuffernd_points.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_points.diminfo[2].shape = __pyx_pybuffernd_points.rcbuffer->pybuffer.shape[2];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_points), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1439
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization_1(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=2] point,
 *                                     int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_13tetrahedralization_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_1(PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_point, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_counter1;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point;
  __Pyx_Buffer __pyx_pybuffer_point;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  long __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyArrayObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyArrayObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tetrahedralization_1", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp3a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3a.refcount = 0;
  __pyx_pybuffernd_tmp3a.data = NULL;
  __pyx_pybuffernd_tmp3a.rcbuffer = &__pyx_pybuffer_tmp3a;
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  __pyx_pybuffer_point.pybuffer.buf = NULL;
  __pyx_pybuffer_point.refcount = 0;
  __pyx_pybuffernd_point.data = NULL;
  __pyx_pybuffernd_point.rcbuffer = &__pyx_pybuffer_point;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  }
  __pyx_pybuffernd_point.diminfo[0].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point.diminfo[0].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point.diminfo[1].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point.diminfo[1].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1448
 *     #cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('    tetrahedralization_1()')
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1449
 * 
 *     if verbose>0:
 *         print('    tetrahedralization_1()')             # <<<<<<<<<<<<<<
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'
 *         print('      volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1450
 *     if verbose>0:
 *         print('    tetrahedralization_1()')
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'             # <<<<<<<<<<<<<<
 *         print('      volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 *     else:
 */
    __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(__pyx_t_2 != Py_None)) {
      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(0, 1450, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __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(0, 1450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1450, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_v1 = __pyx_t_6;
    __pyx_v_v2 = __pyx_t_7;
    __pyx_v_v3 = __pyx_t_8;

    /* "pyqcstrc/icosah/intsct.pyx":1451
 *         print('    tetrahedralization_1()')
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'
 *         print('      volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_volume_of_initial_tetrahedron);
    __pyx_t_9 += 37;
    __Pyx_GIVEREF(__pyx_kp_u_volume_of_initial_tetrahedron);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_volume_of_initial_tetrahedron);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1448
 *     #cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('    tetrahedralization_1()')
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1453
 *         print('      volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     counter1=0
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":1455
 *         pass
 * 
 *     counter1=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj)):
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1456
 * 
 *     counter1=0
 *     for i1 in range(len(obj)):             # <<<<<<<<<<<<<<
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj
 *             counter1+=1
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1456, __pyx_L1_error)
  __pyx_t_11 = __pyx_t_9;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i1 = __pyx_t_12;

    /* "pyqcstrc/icosah/intsct.pyx":1457
 *     counter1=0
 *     for i1 in range(len(obj)):
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj             # <<<<<<<<<<<<<<
 *             counter1+=1
 *             break
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1457, __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_5numpy_ndarray))))) __PYX_ERR(0, 1457, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1457, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __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_5numpy_ndarray))))) __PYX_ERR(0, 1457, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1457, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_point), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_13), 0) == 0) != 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;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1458
 *     for i1 in range(len(obj)):
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj
 *             counter1+=1             # <<<<<<<<<<<<<<
 *             break
 *         else: # outside
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/intsct.pyx":1459
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj
 *             counter1+=1
 *             break             # <<<<<<<<<<<<<<
 *         else: # outside
 *             pass
 */
      goto __pyx_L5_break;

      /* "pyqcstrc/icosah/intsct.pyx":1457
 *     counter1=0
 *     for i1 in range(len(obj)):
 *         if inside_outside_tetrahedron(point,obj[i1][0],obj[i1][1],obj[i1][2],obj[i1][3])==0: # point is inside obj             # <<<<<<<<<<<<<<
 *             counter1+=1
 *             break
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":1461
 *             break
 *         else: # outside
 *             pass             # <<<<<<<<<<<<<<
 *     if counter1!=0:
 *         if verbose>0:
 */
    /*else*/ {
    }
  }
  __pyx_L5_break:;

  /* "pyqcstrc/icosah/intsct.pyx":1462
 *         else: # outside
 *             pass
 *     if counter1!=0:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('      added point is inside obj')
 */
  __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1463
 *             pass
 *     if counter1!=0:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('      added point is inside obj')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1464
 *     if counter1!=0:
 *         if verbose>0:
 *             print('      added point is inside obj')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1463
 *             pass
 *     if counter1!=0:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('      added point is inside obj')
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1466
 *             print('      added point is inside obj')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         #tmp1a=obj.reshape(len(obj)*72)
 *         #tmp1b=point.reshape(18)
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/intsct.pyx":1471
 *         #tmp1a=np.append(tmp1a,tmp1b)
 *         #tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp1a=np.append(obj,point)             # <<<<<<<<<<<<<<
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && 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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_point)};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_point)};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_obj));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_obj));
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, ((PyObject *)__pyx_v_obj));
      __Pyx_INCREF(((PyObject *)__pyx_v_point));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_point));
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, ((PyObject *)__pyx_v_point));
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1471, __pyx_L1_error)
    __pyx_t_14 = ((PyArrayObject *)__pyx_t_13);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
        }
        __pyx_t_15 = __pyx_t_16 = __pyx_t_17 = 0;
      }
      __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1471, __pyx_L1_error)
    }
    __pyx_t_14 = 0;
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1472
 *         #tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp1a=np.append(obj,point)
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *         return tetrahedralization_points(tmp3a,verbose)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1472, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && 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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_5, __pyx_int_6, __pyx_int_3};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_5, __pyx_int_6, __pyx_int_3};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_12, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1472, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_13);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_17, __pyx_t_16, __pyx_t_15);
        }
        __pyx_t_17 = __pyx_t_16 = __pyx_t_15 = 0;
      }
      __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1472, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1473
 *         tmp1a=np.append(obj,point)
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *         return tetrahedralization_points(tmp3a,verbose)
 *     else:
 */
    __pyx_t_13 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_13), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
        }
        __pyx_t_15 = __pyx_t_16 = __pyx_t_17 = 0;
      }
      __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1473, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_13));
    __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1474
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *         return tetrahedralization_points(tmp3a,verbose)             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_13 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_r = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":1462
 *         else: # outside
 *             pass
 *     if counter1!=0:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('      added point is inside obj')
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":1476
 *         return tetrahedralization_points(tmp3a,verbose)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('      added point is out of obj')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1477
 *     else:
 *         if verbose>0:
 *             print('      added point is out of obj')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1476
 *         return tetrahedralization_points(tmp3a,verbose)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('      added point is out of obj')
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1479
 *             print('      added point is out of obj')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/intsct.pyx":1480
 *         else:
 *             pass
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1439
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization_1(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=2] point,
 *                                     int verbose):
 */

  /* 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_13);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_13tetrahedralization_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_13tetrahedralization_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  PyArrayObject *__pyx_v_point = 0;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tetrahedralization_1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_point,&__pyx_n_s_verbose,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_point)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tetrahedralization_1", 1, 3, 3, 1); __PYX_ERR(0, 1439, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tetrahedralization_1", 1, 3, 3, 2); __PYX_ERR(0, 1439, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tetrahedralization_1") < 0)) __PYX_ERR(0, 1439, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_obj = ((PyArrayObject *)values[0]);
    __pyx_v_point = ((PyArrayObject *)values[1]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1441, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tetrahedralization_1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_5numpy_ndarray, 1, "obj", 0))) __PYX_ERR(0, 1439, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_point), __pyx_ptype_5numpy_ndarray, 1, "point", 0))) __PYX_ERR(0, 1440, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_12tetrahedralization_1(__pyx_self, __pyx_v_obj, __pyx_v_point, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_12tetrahedralization_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_point, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point;
  __Pyx_Buffer __pyx_pybuffer_point;
  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("tetrahedralization_1", 0);
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  __pyx_pybuffer_point.pybuffer.buf = NULL;
  __pyx_pybuffer_point.refcount = 0;
  __pyx_pybuffernd_point.data = NULL;
  __pyx_pybuffernd_point.rcbuffer = &__pyx_pybuffer_point;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  }
  __pyx_pybuffernd_point.diminfo[0].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_point.diminfo[0].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_point.diminfo[1].strides = __pyx_pybuffernd_point.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_point.diminfo[1].shape = __pyx_pybuffernd_point.rcbuffer->pybuffer.shape[1];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_1(((PyArrayObject *)__pyx_v_obj), ((PyArrayObject *)__pyx_v_point), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1484
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] intersecting_point,
 *                                     int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_15tetrahedralization(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_intersecting_point, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int __pyx_v_counter;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  double __pyx_v_vx;
  double __pyx_v_vy;
  double __pyx_v_vz;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_xi = 0;
  PyArrayObject *__pyx_v_yi = 0;
  PyArrayObject *__pyx_v_zi = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp1v = 0;
  PyArrayObject *__pyx_v_tmp2v = 0;
  PyObject *__pyx_v_ltmp = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_intersecting_point;
  __Pyx_Buffer __pyx_pybuffer_intersecting_point;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1v;
  __Pyx_Buffer __pyx_pybuffer_tmp1v;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2v;
  __Pyx_Buffer __pyx_pybuffer_tmp2v;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3b;
  __Pyx_Buffer __pyx_pybuffer_tmp3b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_xi;
  __Pyx_Buffer __pyx_pybuffer_xi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_yi;
  __Pyx_Buffer __pyx_pybuffer_yi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_zi;
  __Pyx_Buffer __pyx_pybuffer_zi;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  long __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_t_11;
  PyArrayObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyArrayObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __pyx_t_5numpy_float64_t __pyx_t_24;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_25;
  PyArrayObject *__pyx_t_26 = NULL;
  PyArrayObject *__pyx_t_27 = NULL;
  PyArrayObject *__pyx_t_28 = NULL;
  int __pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tetrahedralization", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_xi.pybuffer.buf = NULL;
  __pyx_pybuffer_xi.refcount = 0;
  __pyx_pybuffernd_xi.data = NULL;
  __pyx_pybuffernd_xi.rcbuffer = &__pyx_pybuffer_xi;
  __pyx_pybuffer_yi.pybuffer.buf = NULL;
  __pyx_pybuffer_yi.refcount = 0;
  __pyx_pybuffernd_yi.data = NULL;
  __pyx_pybuffernd_yi.rcbuffer = &__pyx_pybuffer_yi;
  __pyx_pybuffer_zi.pybuffer.buf = NULL;
  __pyx_pybuffer_zi.refcount = 0;
  __pyx_pybuffernd_zi.data = NULL;
  __pyx_pybuffernd_zi.rcbuffer = &__pyx_pybuffer_zi;
  __pyx_pybuffer_tmp3a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3a.refcount = 0;
  __pyx_pybuffernd_tmp3a.data = NULL;
  __pyx_pybuffernd_tmp3a.rcbuffer = &__pyx_pybuffer_tmp3a;
  __pyx_pybuffer_tmp3b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3b.refcount = 0;
  __pyx_pybuffernd_tmp3b.data = NULL;
  __pyx_pybuffernd_tmp3b.rcbuffer = &__pyx_pybuffer_tmp3b;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_tmp1v.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1v.refcount = 0;
  __pyx_pybuffernd_tmp1v.data = NULL;
  __pyx_pybuffernd_tmp1v.rcbuffer = &__pyx_pybuffer_tmp1v;
  __pyx_pybuffer_tmp2v.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2v.refcount = 0;
  __pyx_pybuffernd_tmp2v.data = NULL;
  __pyx_pybuffernd_tmp2v.rcbuffer = &__pyx_pybuffer_tmp2v;
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_intersecting_point.pybuffer.buf = NULL;
  __pyx_pybuffer_intersecting_point.refcount = 0;
  __pyx_pybuffernd_intersecting_point.data = NULL;
  __pyx_pybuffernd_intersecting_point.rcbuffer = &__pyx_pybuffer_intersecting_point;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_intersecting_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  }
  __pyx_pybuffernd_intersecting_point.diminfo[0].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_intersecting_point.diminfo[0].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_intersecting_point.diminfo[1].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_intersecting_point.diminfo[1].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_intersecting_point.diminfo[2].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_intersecting_point.diminfo[2].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/intsct.pyx":1499
 *     cdef list ltmp
 *     #
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           tetrahedralization()')
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1500
 *     #
 *     if verbose>0:
 *         print('           tetrahedralization()')             # <<<<<<<<<<<<<<
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'
 *         print('            volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1501
 *     if verbose>0:
 *         print('           tetrahedralization()')
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'             # <<<<<<<<<<<<<<
 *         print('            volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 *     else:
 */
    __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(__pyx_t_2 != Py_None)) {
      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(0, 1501, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __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(0, 1501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1501, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_v1 = __pyx_t_6;
    __pyx_v_v2 = __pyx_t_7;
    __pyx_v_v3 = __pyx_t_8;

    /* "pyqcstrc/icosah/intsct.pyx":1502
 *         print('           tetrahedralization()')
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'
 *         print('            volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_volume_of_initial_tetrahedron_2);
    __pyx_t_9 += 43;
    __Pyx_GIVEREF(__pyx_kp_u_volume_of_initial_tetrahedron_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_volume_of_initial_tetrahedron_2);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1499
 *     cdef list ltmp
 *     #
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           tetrahedralization()')
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1504
 *         print('            volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.append(tetrahedron,intersecting_point)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/intsct.pyx":1506
 *         pass
 * 
 *     tmp1a=np.append(tetrahedron,intersecting_point)             # <<<<<<<<<<<<<<
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && 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_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tetrahedron), ((PyObject *)__pyx_v_intersecting_point)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tetrahedron), ((PyObject *)__pyx_v_intersecting_point)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_11, ((PyObject *)__pyx_v_tetrahedron));
    __Pyx_INCREF(((PyObject *)__pyx_v_intersecting_point));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_intersecting_point));
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_11, ((PyObject *)__pyx_v_intersecting_point));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1506, __pyx_L1_error)
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1506, __pyx_L1_error)
  }
  __pyx_t_12 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1507
 * 
 *     tmp1a=np.append(tetrahedron,intersecting_point)
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1507, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && 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_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_11, __pyx_t_3);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_11, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_11, __pyx_int_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1507, __pyx_L1_error)
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
      __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_tmp3a.diminfo[0].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3a.diminfo[0].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3a.diminfo[1].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3a.diminfo[1].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3a.diminfo[2].strides = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3a.diminfo[2].shape = __pyx_pybuffernd_tmp3a.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1507, __pyx_L1_error)
  }
  __pyx_t_17 = 0;
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1509
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            numbre of points: %3d :'%len(intersecting_point))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1510
 * 
 *     if verbose>0:
 *         print('            numbre of points: %3d :'%len(intersecting_point))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_intersecting_point)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1510, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_numbre_of_points_3d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __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;

    /* "pyqcstrc/icosah/intsct.pyx":1509
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            numbre of points: %3d :'%len(intersecting_point))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1512
 *         print('            numbre of points: %3d :'%len(intersecting_point))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     for i in range(len(tmp3a)):
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/intsct.pyx":1513
 *     else:
 *         pass
 *     for i in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 *         _,_,_,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1513, __pyx_L1_error)
  __pyx_t_18 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_18; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyqcstrc/icosah/intsct.pyx":1515
 *     for i in range(len(tmp3a)):
 *         #xe,ye,ze,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])
 *         _,_,_,xi,yi,zi=projection(tmp3a[i][0],tmp3a[i][1],tmp3a[i][2],tmp3a[i][3],tmp3a[i][4],tmp3a[i][5])             # <<<<<<<<<<<<<<
 *         #vx=(xi[0]+xi[1]*TAU)/float(xi[2]) # numeric value of xi
 *         #vy=(yi[0]+yi[1]*TAU)/float(yi[2])
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __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_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __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_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_2, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_19), ((PyArrayObject *)__pyx_t_20), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (likely(__pyx_t_2 != Py_None)) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 6)) {
        if (size > 6) __Pyx_RaiseTooManyValuesError(6);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1515, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_20 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_19 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_16 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 5); 
      __Pyx_INCREF(__pyx_t_20);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_4);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[6] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_5,&__pyx_t_3,&__pyx_t_16,&__pyx_t_4};
        for (i=0; i < 6; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1515, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1515, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_20);
    __pyx_t_20 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_19);
    __pyx_t_19 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
      __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xi.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_21 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xi.rcbuffer->pybuffer, (PyObject*)__pyx_v_xi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        }
        __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
      }
      __pyx_pybuffernd_xi.diminfo[0].strides = __pyx_pybuffernd_xi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xi.diminfo[0].shape = __pyx_pybuffernd_xi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __Pyx_XDECREF_SET(__pyx_v_xi, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_16);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
      __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yi.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_21 < 0)) {
        PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yi.rcbuffer->pybuffer, (PyObject*)__pyx_v_yi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
        }
        __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
      }
      __pyx_pybuffernd_yi.diminfo[0].strides = __pyx_pybuffernd_yi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yi.diminfo[0].shape = __pyx_pybuffernd_yi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __Pyx_XDECREF_SET(__pyx_v_yi, ((PyArrayObject *)__pyx_t_16));
    __pyx_t_16 = 0;
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
      __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zi.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_21 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zi.rcbuffer->pybuffer, (PyObject*)__pyx_v_zi, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        }
        __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
      }
      __pyx_pybuffernd_zi.diminfo[0].strides = __pyx_pybuffernd_zi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_zi.diminfo[0].shape = __pyx_pybuffernd_zi.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __Pyx_XDECREF_SET(__pyx_v_zi, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1519
 *         #vy=(yi[0]+yi[1]*TAU)/float(yi[2])
 *         #vz=(zi[0]+zi[1]*TAU)/float(zi[2])
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi             # <<<<<<<<<<<<<<
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 */
    __pyx_t_22 = 0;
    __pyx_t_23 = 1;
    __pyx_t_24 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_xi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_xi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_23 = 2;
    __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_xi.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_xi.diminfo[0].strides));
    if (unlikely(__pyx_t_25 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1519, __pyx_L1_error)
    }
    __pyx_v_vx = (__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_t_25));

    /* "pyqcstrc/icosah/intsct.pyx":1520
 *         #vz=(zi[0]+zi[1]*TAU)/float(zi[2])
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]             # <<<<<<<<<<<<<<
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:
 */
    __pyx_t_23 = 0;
    __pyx_t_22 = 1;
    __pyx_t_24 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_yi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_yi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_22 = 2;
    __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_yi.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_yi.diminfo[0].strides));
    if (unlikely(__pyx_t_25 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1520, __pyx_L1_error)
    }
    __pyx_v_vy = (__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_t_25));

    /* "pyqcstrc/icosah/intsct.pyx":1521
 *         vx=(xi[0]+xi[1]*TAU)/xi[2] # numeric value of xi
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]             # <<<<<<<<<<<<<<
 *         if i==0:
 *             tmp1v=np.array([vx,vy,vz])
 */
    __pyx_t_22 = 0;
    __pyx_t_23 = 1;
    __pyx_t_24 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_zi.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_zi.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_23 = 2;
    __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_zi.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_zi.diminfo[0].strides));
    if (unlikely(__pyx_t_25 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1521, __pyx_L1_error)
    }
    __pyx_v_vz = (__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_t_25));

    /* "pyqcstrc/icosah/intsct.pyx":1522
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:             # <<<<<<<<<<<<<<
 *             tmp1v=np.array([vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 */
    __pyx_t_1 = ((__pyx_v_i == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1523
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:
 *             tmp1v=np.array([vx,vy,vz])             # <<<<<<<<<<<<<<
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *         else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vz); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_19 = PyList_New(3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_19, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_19, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_19, 2, __pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_3 = 0;
      __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_5, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_19);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1523, __pyx_L1_error)
      __pyx_t_26 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
        __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_21 < 0)) {
          PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
          }
          __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
        }
        __pyx_pybuffernd_tmp1v.diminfo[0].strides = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1v.diminfo[0].shape = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1523, __pyx_L1_error)
      }
      __pyx_t_26 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1v, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1522
 *         vy=(yi[0]+yi[1]*TAU)/yi[2]
 *         vz=(zi[0]+zi[1]*TAU)/zi[2]
 *         if i==0:             # <<<<<<<<<<<<<<
 *             tmp1v=np.array([vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 */
      goto __pyx_L7;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1526
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *         else:
 *             tmp1v=np.append(tmp1v,[vx,vy,vz])             # <<<<<<<<<<<<<<
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyFloat_FromDouble(__pyx_v_vx); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_16);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
      __pyx_t_16 = 0;
      __pyx_t_5 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_21 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_19);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_19, function);
          __pyx_t_21 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1v), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1v), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_21); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1v));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1v));
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_21, ((PyObject *)__pyx_v_tmp1v));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_21, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1526, __pyx_L1_error)
      __pyx_t_26 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
        __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_21 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
          __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
        }
        __pyx_pybuffernd_tmp1v.diminfo[0].strides = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1v.diminfo[0].shape = __pyx_pybuffernd_tmp1v.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1526, __pyx_L1_error)
      }
      __pyx_t_26 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1v, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;
    }
    __pyx_L7:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1528
 *             tmp1v=np.append(tmp1v,[vx,vy,vz])
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)             # <<<<<<<<<<<<<<
 *     ltmp=decomposition(tmp2v)
 *     tmp4a=np.array([[[[0]]]])
 */
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1v), __pyx_n_s_reshape); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1v)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1528, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 3.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_11, __pyx_t_5);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_11, __pyx_int_3);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1528, __pyx_L1_error)
  __pyx_t_27 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
      __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
    }
    __pyx_pybuffernd_tmp2v.diminfo[0].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2v.diminfo[0].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2v.diminfo[1].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2v.diminfo[1].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
  }
  __pyx_t_27 = 0;
  __pyx_v_tmp2v = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1529
 *             #print '     %8.6f %8.6f %8.6f'%(vx,vy,vz)
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)
 *     ltmp=decomposition(tmp2v)             # <<<<<<<<<<<<<<
 *     tmp4a=np.array([[[[0]]]])
 *     if ltmp!=[0]:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_6intsct_decomposition(((PyArrayObject *)__pyx_v_tmp2v)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ltmp = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1530
 *     tmp2v=tmp1v.reshape(int(len(tmp1v)/3),3)
 *     ltmp=decomposition(tmp2v)
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     if ltmp!=[0]:
 *         #print '   -> N of tetrahedron: %3d'%(len(ltmp))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_np); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_19, 0, __pyx_int_0);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_19);
  __pyx_t_19 = 0;
  __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_19, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_19);
  __pyx_t_19 = 0;
  __pyx_t_19 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_19, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __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_5numpy_ndarray))))) __PYX_ERR(0, 1530, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
    }
    __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1530, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1531
 *     ltmp=decomposition(tmp2v)
 *     tmp4a=np.array([[[[0]]]])
 *     if ltmp!=[0]:             # <<<<<<<<<<<<<<
 *         #print '   -> N of tetrahedron: %3d'%(len(ltmp))
 *         #w1,w2,w3=0,0,1
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_ltmp, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __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(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/intsct.pyx":1534
 *         #print '   -> N of tetrahedron: %3d'%(len(ltmp))
 *         #w1,w2,w3=0,0,1
 *         counter=0             # <<<<<<<<<<<<<<
 *         for i in range(len(ltmp)):
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 */
    __pyx_v_counter = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1535
 *         #w1,w2,w3=0,0,1
 *         counter=0
 *         for i in range(len(ltmp)):             # <<<<<<<<<<<<<<
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 *             #v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 */
    if (unlikely(__pyx_v_ltmp == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1535, __pyx_L1_error)
    }
    __pyx_t_9 = PyList_GET_SIZE(__pyx_v_ltmp); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1535, __pyx_L1_error)
    __pyx_t_18 = __pyx_t_9;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_18; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "pyqcstrc/icosah/intsct.pyx":1536
 *         counter=0
 *         for i in range(len(ltmp)):
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             #v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1536, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_19 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1536, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1536, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_v_ltmp == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1536, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_ltmp, __pyx_v_i), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_20 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tmp3a), __pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_19);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_16);
      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_20);
      __pyx_t_19 = 0;
      __pyx_t_4 = 0;
      __pyx_t_16 = 0;
      __pyx_t_20 = 0;
      __pyx_t_20 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_20)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_20);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_3 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_20, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __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_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1536, __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__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1536, __pyx_L1_error)
      __pyx_t_17 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_21 < 0)) {
          PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
          }
          __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
        }
        __pyx_pybuffernd_tmp3b.diminfo[0].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3b.diminfo[0].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3b.diminfo[1].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3b.diminfo[1].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3b.diminfo[2].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3b.diminfo[2].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1536, __pyx_L1_error)
      }
      __pyx_t_17 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1538
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)
 *             #v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 *             if v1==0 and v2==0:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
 */
      __pyx_t_29 = ((__pyx_v_v1 == 0) != 0);
      if (__pyx_t_29) {
      } else {
        __pyx_t_1 = __pyx_t_29;
        goto __pyx_L12_bool_binop_done;
      }
      __pyx_t_29 = ((__pyx_v_v2 == 0) != 0);
      __pyx_t_1 = __pyx_t_29;
      __pyx_L12_bool_binop_done:;
      if (__pyx_t_1) {
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1541
 *                 pass
 *             else:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_counter == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/intsct.pyx":1542
 *             else:
 *                 if counter==0:
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72             # <<<<<<<<<<<<<<
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 *                 else:
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1542, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && 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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1542, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_3);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_21 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              }
              __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1542, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1541
 *                 pass
 *             else:
 *                 if counter==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3b.reshape(72) # 4*6*3=72
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 */
          goto __pyx_L14;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1545
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3b)             # <<<<<<<<<<<<<<
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 *                     #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          __pyx_t_21 = 0;
          if (CYTHON_UNPACK_METHODS && 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_21 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3b)};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3b)};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_20 = PyTuple_New(2+__pyx_t_21); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1545, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_20);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_21, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp3b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3b));
            PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_21, ((PyObject *)__pyx_v_tmp3b));
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1545, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_3);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_21 < 0)) {
              PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
              }
              __pyx_t_15 = __pyx_t_14 = __pyx_t_13 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;
        }
        __pyx_L14:;

        /* "pyqcstrc/icosah/intsct.pyx":1548
 *                     #print '     volume : (%d+%d*TAU)/%d'%(v1,v2,v3)
 *                     #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1             # <<<<<<<<<<<<<<
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 */
        __pyx_v_counter = (__pyx_v_counter + 1);
      }
      __pyx_L11:;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1549
 *                     #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1
 *         if counter!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 */
    __pyx_t_1 = ((__pyx_v_counter != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/intsct.pyx":1550
 *                 counter+=1
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 v1,v2,v3=obj_volume_6d(tmp4a)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1550, __pyx_L1_error)
      __pyx_t_20 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 72.0)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_5 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && 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_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_20, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_20, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_11, __pyx_t_20);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_11, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_11, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_11, __pyx_int_3);
        __pyx_t_20 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1550, __pyx_L1_error)
      __pyx_t_28 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_11 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
          __pyx_t_13 = __pyx_t_14 = __pyx_t_15 = 0;
        }
        __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1550, __pyx_L1_error)
      }
      __pyx_t_28 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1551
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v1,v2,v3=obj_volume_6d(tmp4a)
 *                 print('              -> numbre of tetrahedra: %3d:'%(int(len(tmp4a))))
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/intsct.pyx":1552
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 *                 v1,v2,v3=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *                 print('              -> numbre of tetrahedra: %3d:'%(int(len(tmp4a))))
 *                 print('                 Total volume : %d %d %d (%8.6f)'%(v1,v2,v3,(v1+v2*TAU)/v3))
 */
        __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(__pyx_t_3 != Py_None)) {
          PyObject* sequence = __pyx_t_3;
          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(0, 1552, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_16 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_20 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_20);
          #else
          __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1552, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_20 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1552, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1552, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_16); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __pyx_v_v1 = __pyx_t_8;
        __pyx_v_v2 = __pyx_t_7;
        __pyx_v_v3 = __pyx_t_6;

        /* "pyqcstrc/icosah/intsct.pyx":1553
 *             if verbose>0:
 *                 v1,v2,v3=obj_volume_6d(tmp4a)
 *                 print('              -> numbre of tetrahedra: %3d:'%(int(len(tmp4a))))             # <<<<<<<<<<<<<<
 *                 print('                 Total volume : %d %d %d (%8.6f)'%(v1,v2,v3,(v1+v2*TAU)/v3))
 *                 #print('            -> Total2 : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 */
        __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1553, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_numbre_of_tetrahedra_3d, __pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1554
 *                 v1,v2,v3=obj_volume_6d(tmp4a)
 *                 print('              -> numbre of tetrahedra: %3d:'%(int(len(tmp4a))))
 *                 print('                 Total volume : %d %d %d (%8.6f)'%(v1,v2,v3,(v1+v2*TAU)/v3))             # <<<<<<<<<<<<<<
 *                 #print('            -> Total2 : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 *             else:
 */
        __pyx_t_20 = PyTuple_New(9); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_Total_volume);
        __pyx_t_9 += 32;
        __Pyx_GIVEREF(__pyx_kp_u_Total_volume);
        PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_kp_u_Total_volume);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_kp_u__5);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_kp_u__5);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__6);
        __pyx_t_9 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__6);
        PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_kp_u__6);
        __pyx_t_24 = (__pyx_v_v1 + (__pyx_v_v2 * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
        if (unlikely(__pyx_v_v3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1554, __pyx_L1_error)
        }
        __pyx_t_3 = PyFloat_FromDouble((__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__7);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__7);
        PyTuple_SET_ITEM(__pyx_t_20, 8, __pyx_kp_u__7);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_20, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_16); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1551
 *         if counter!=0:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v1,v2,v3=obj_volume_6d(tmp4a)
 *                 print('              -> numbre of tetrahedra: %3d:'%(int(len(tmp4a))))
 */
        goto __pyx_L16;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1557
 *                 #print('            -> Total2 : %d %d %d (%8.6f)'%(w1,w2,w3,(w1+w2*TAU)/w3))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L16:;

      /* "pyqcstrc/icosah/intsct.pyx":1549
 *                     #w1,w2,w3=add(v1,v2,v3,w1,w2,w3)
 *                 counter+=1
 *         if counter!=0:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3) # 4*6*3=72
 *             if verbose>0:
 */
      goto __pyx_L15;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1559
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4a
 *     else:
 */
    /*else*/ {
    }
    __pyx_L15:;

    /* "pyqcstrc/icosah/intsct.pyx":1560
 *         else:
 *             pass
 *         return tmp4a             # <<<<<<<<<<<<<<
 *     else:
 *         #return np.array([[[[0]]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/intsct.pyx":1531
 *     ltmp=decomposition(tmp2v)
 *     tmp4a=np.array([[[[0]]]])
 *     if ltmp!=[0]:             # <<<<<<<<<<<<<<
 *         #print '   -> N of tetrahedron: %3d'%(len(ltmp))
 *         #w1,w2,w3=0,0,1
 */
  }

  /* "pyqcstrc/icosah/intsct.pyx":1565
 *         #return tmp4a
 *         #pass
 *         return tmp4a             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1484
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cpdef np.ndarray tetrahedralization(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] intersecting_point,
 *                                     int verbose):
 */

  /* 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_16);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1v.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xi.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yi.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zi.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_xi);
  __Pyx_XDECREF((PyObject *)__pyx_v_yi);
  __Pyx_XDECREF((PyObject *)__pyx_v_zi);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1v);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2v);
  __Pyx_XDECREF(__pyx_v_ltmp);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_15tetrahedralization(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_6intsct_15tetrahedralization(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_tetrahedron = 0;
  PyArrayObject *__pyx_v_intersecting_point = 0;
  int __pyx_v_verbose;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tetrahedralization (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tetrahedron_2,&__pyx_n_s_intersecting_point,&__pyx_n_s_verbose,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tetrahedron_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intersecting_point)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tetrahedralization", 1, 3, 3, 1); __PYX_ERR(0, 1484, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tetrahedralization", 1, 3, 3, 2); __PYX_ERR(0, 1484, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tetrahedralization") < 0)) __PYX_ERR(0, 1484, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_tetrahedron = ((PyArrayObject *)values[0]);
    __pyx_v_intersecting_point = ((PyArrayObject *)values[1]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tetrahedralization", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1484, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tetrahedron), __pyx_ptype_5numpy_ndarray, 1, "tetrahedron", 0))) __PYX_ERR(0, 1484, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_intersecting_point), __pyx_ptype_5numpy_ndarray, 1, "intersecting_point", 0))) __PYX_ERR(0, 1485, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_6intsct_14tetrahedralization(__pyx_self, __pyx_v_tetrahedron, __pyx_v_intersecting_point, __pyx_v_verbose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pyqcstrc_6icosah_6intsct_14tetrahedralization(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_intersecting_point, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_intersecting_point;
  __Pyx_Buffer __pyx_pybuffer_intersecting_point;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  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("tetrahedralization", 0);
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_intersecting_point.pybuffer.buf = NULL;
  __pyx_pybuffer_intersecting_point.refcount = 0;
  __pyx_pybuffernd_intersecting_point.data = NULL;
  __pyx_pybuffernd_intersecting_point.rcbuffer = &__pyx_pybuffer_intersecting_point;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_intersecting_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  }
  __pyx_pybuffernd_intersecting_point.diminfo[0].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_intersecting_point.diminfo[0].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_intersecting_point.diminfo[1].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_intersecting_point.diminfo[1].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_intersecting_point.diminfo[2].strides = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_intersecting_point.diminfo[2].shape = __pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer.shape[2];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_intersecting_point), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.tetrahedralization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_intersecting_point.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1569
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef list decomposition(np.ndarray[DTYPE_double_t, ndim=2] tmp2v):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef list tmp=[]
 */

static PyObject *__pyx_f_8pyqcstrc_6icosah_6intsct_decomposition(PyArrayObject *__pyx_v_tmp2v) {
  int __pyx_v_i;
  PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_v_tri = NULL;
  PyObject *__pyx_v_tet = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2v;
  __Pyx_Buffer __pyx_pybuffer_tmp2v;
  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;
  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("decomposition", 0);
  __pyx_pybuffer_tmp2v.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2v.refcount = 0;
  __pyx_pybuffernd_tmp2v.data = NULL;
  __pyx_pybuffernd_tmp2v.rcbuffer = &__pyx_pybuffer_tmp2v;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2v, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1569, __pyx_L1_error)
  }
  __pyx_pybuffernd_tmp2v.diminfo[0].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2v.diminfo[0].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2v.diminfo[1].strides = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2v.diminfo[1].shape = __pyx_pybuffernd_tmp2v.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1571
 * cdef list decomposition(np.ndarray[DTYPE_double_t, ndim=2] tmp2v):
 *     cdef int i
 *     cdef list tmp=[]             # <<<<<<<<<<<<<<
 *     try:
 *         tri=Delaunay(tmp2v)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1572
 *     cdef int i
 *     cdef list tmp=[]
 *     try:             # <<<<<<<<<<<<<<
 *         tri=Delaunay(tmp2v)
 *     except:
 */
  {
    __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:*/ {

      /* "pyqcstrc/icosah/intsct.pyx":1573
 *     cdef list tmp=[]
 *     try:
 *         tri=Delaunay(tmp2v)             # <<<<<<<<<<<<<<
 *     except:
 *         print('error in decomposition()')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Delaunay); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_tmp2v)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_tmp2v));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_tri = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1572
 *     cdef int i
 *     cdef list tmp=[]
 *     try:             # <<<<<<<<<<<<<<
 *         tri=Delaunay(tmp2v)
 *     except:
 */
    }

    /* "pyqcstrc/icosah/intsct.pyx":1578
 *         tmp=[0]
 *     else:
 *         for i in range(len(tri.simplices)):             # <<<<<<<<<<<<<<
 *             tet=tri.simplices[i]
 *             tmp.append([tet[0],tet[1],tet[2],tet[3]])
 */
    /*else:*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tri, __pyx_n_s_simplices); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1578, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_7;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_i = __pyx_t_9;

        /* "pyqcstrc/icosah/intsct.pyx":1579
 *     else:
 *         for i in range(len(tri.simplices)):
 *             tet=tri.simplices[i]             # <<<<<<<<<<<<<<
 *             tmp.append([tet[0],tet[1],tet[2],tet[3]])
 *     return tmp
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tri, __pyx_n_s_simplices); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tet, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1580
 *         for i in range(len(tri.simplices)):
 *             tet=tri.simplices[i]
 *             tmp.append([tet[0],tet[1],tet[2],tet[3]])             # <<<<<<<<<<<<<<
 *     return tmp
 * 
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_tet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tet, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_tet, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_tet, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = PyList_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_5);
        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1);
        PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_6);
        PyList_SET_ITEM(__pyx_t_11, 2, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_10);
        PyList_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
        __pyx_t_5 = 0;
        __pyx_t_1 = 0;
        __pyx_t_6 = 0;
        __pyx_t_10 = 0;
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_11); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1580, __pyx_L5_except_error)
        __Pyx_DECREF(__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;
    goto __pyx_L8_try_end;
    __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;

    /* "pyqcstrc/icosah/intsct.pyx":1574
 *     try:
 *         tri=Delaunay(tmp2v)
 *     except:             # <<<<<<<<<<<<<<
 *         print('error in decomposition()')
 *         tmp=[0]
 */
    /*except:*/ {
      __Pyx_AddTraceback("pyqcstrc.icosah.intsct.decomposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_6) < 0) __PYX_ERR(0, 1574, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_6);

      /* "pyqcstrc/icosah/intsct.pyx":1575
 *         tri=Delaunay(tmp2v)
 *     except:
 *         print('error in decomposition()')             # <<<<<<<<<<<<<<
 *         tmp=[0]
 *     else:
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1576
 *     except:
 *         print('error in decomposition()')
 *         tmp=[0]             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(len(tri.simplices)):
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;
      __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_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "pyqcstrc/icosah/intsct.pyx":1572
 *     cdef int i
 *     cdef list tmp=[]
 *     try:             # <<<<<<<<<<<<<<
 *         tri=Delaunay(tmp2v)
 *     except:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1581
 *             tet=tri.simplices[i]
 *             tmp.append([tet[0],tet[1],tet[2],tet[3]])
 *     return tmp             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tmp);
  __pyx_r = __pyx_v_tmp;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1569
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef list decomposition(np.ndarray[DTYPE_double_t, ndim=2] tmp2v):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef list tmp=[]
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.decomposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2v.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_tri);
  __Pyx_XDECREF(__pyx_v_tet);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1585
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray centroid_obj(np.ndarray[DTYPE_int_t, ndim=4] obj):             # <<<<<<<<<<<<<<
 *     #  geometric center, centroid of OBJ
 *     cdef int i1,i2,i3,num
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_6intsct_centroid_obj(PyArrayObject *__pyx_v_obj) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_num;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  long __pyx_t_11;
  long __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_18;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_19;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_20;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("centroid_obj", 0);
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1585, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/intsct.pyx":1590
 *     cpdef long v1,v2,v3
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     num=len(obj)
 *     for i3 in range(6):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __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(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1590, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1591
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 *     tmp1a=np.array([0])
 *     num=len(obj)             # <<<<<<<<<<<<<<
 *     for i3 in range(6):
 *         v1,v2,v3=0,0,1
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1591, __pyx_L1_error)
  __pyx_v_num = __pyx_t_10;

  /* "pyqcstrc/icosah/intsct.pyx":1592
 *     tmp1a=np.array([0])
 *     num=len(obj)
 *     for i3 in range(6):             # <<<<<<<<<<<<<<
 *         v1,v2,v3=0,0,1
 *         for i1 in range(num):
 */
  for (__pyx_t_6 = 0; __pyx_t_6 < 6; __pyx_t_6+=1) {
    __pyx_v_i3 = __pyx_t_6;

    /* "pyqcstrc/icosah/intsct.pyx":1593
 *     num=len(obj)
 *     for i3 in range(6):
 *         v1,v2,v3=0,0,1             # <<<<<<<<<<<<<<
 *         for i1 in range(num):
 *             for i2 in range(4):
 */
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 1;
    __pyx_v_v1 = __pyx_t_11;
    __pyx_v_v2 = __pyx_t_12;
    __pyx_v_v3 = __pyx_t_13;

    /* "pyqcstrc/icosah/intsct.pyx":1594
 *     for i3 in range(6):
 *         v1,v2,v3=0,0,1
 *         for i1 in range(num):             # <<<<<<<<<<<<<<
 *             for i2 in range(4):
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 */
    __pyx_t_14 = __pyx_v_num;
    __pyx_t_15 = __pyx_t_14;
    for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
      __pyx_v_i1 = __pyx_t_16;

      /* "pyqcstrc/icosah/intsct.pyx":1595
 *         v1,v2,v3=0,0,1
 *         for i1 in range(num):
 *             for i2 in range(4):             # <<<<<<<<<<<<<<
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)
 */
      for (__pyx_t_17 = 0; __pyx_t_17 < 4; __pyx_t_17+=1) {
        __pyx_v_i2 = __pyx_t_17;

        /* "pyqcstrc/icosah/intsct.pyx":1596
 *         for i1 in range(num):
 *             for i2 in range(4):
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])             # <<<<<<<<<<<<<<
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)
 *         if i3!=0:
 */
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_18 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_19 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_20 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_20 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_v1, __pyx_v_v2, __pyx_v_v3, __pyx_t_18, __pyx_t_19, __pyx_t_20, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(__pyx_t_3 != Py_None)) {
          PyObject* sequence = __pyx_t_3;
          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(0, 1596, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1596, __pyx_L1_error)
        }
        __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_v1 = __pyx_t_13;
        __pyx_v_v2 = __pyx_t_12;
        __pyx_v_v3 = __pyx_t_11;
      }
    }

    /* "pyqcstrc/icosah/intsct.pyx":1597
 *             for i2 in range(4):
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)             # <<<<<<<<<<<<<<
 *         if i3!=0:
 *             tmp1a=np.append(tmp1a,[v1,v2,v3])
 */
    __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5math1_mul(__pyx_v_v1, __pyx_v_v2, __pyx_v_v3, 1, 0, (__pyx_v_num * 4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(__pyx_t_3 != Py_None)) {
      PyObject* sequence = __pyx_t_3;
      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(0, 1597, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1597, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_v1 = __pyx_t_11;
    __pyx_v_v2 = __pyx_t_12;
    __pyx_v_v3 = __pyx_t_13;

    /* "pyqcstrc/icosah/intsct.pyx":1598
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)
 *         if i3!=0:             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,[v1,v2,v3])
 *         else:
 */
    __pyx_t_21 = ((__pyx_v_i3 != 0) != 0);
    if (__pyx_t_21) {

      /* "pyqcstrc/icosah/intsct.pyx":1599
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)
 *         if i3!=0:
 *             tmp1a=np.append(tmp1a,[v1,v2,v3])             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=np.array([v1,v2,v3])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_v1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_v2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_22 = __Pyx_PyInt_From_long(__pyx_v_v3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_23 = PyList_New(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_23, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_23, 1, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_22);
      PyList_SET_ITEM(__pyx_t_23, 2, __pyx_t_22);
      __pyx_t_1 = 0;
      __pyx_t_4 = 0;
      __pyx_t_22 = 0;
      __pyx_t_22 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_22)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_22);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_22, ((PyObject *)__pyx_v_tmp1a), __pyx_t_23};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_22, ((PyObject *)__pyx_v_tmp1a), __pyx_t_23};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_22) {
          __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_22); __pyx_t_22 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_14, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(__pyx_t_23);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_14, __pyx_t_23);
        __pyx_t_23 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __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;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1599, __pyx_L1_error)
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 0)) {
          PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          }
          __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
        }
        __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1599, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1598
 *                 v1,v2,v3=add(v1,v2,v3,obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *         v1,v2,v3=mul(v1,v2,v3,1,0,num*4)
 *         if i3!=0:             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,[v1,v2,v3])
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1601
 *             tmp1a=np.append(tmp1a,[v1,v2,v3])
 *         else:
 *             tmp1a=np.array([v1,v2,v3])             # <<<<<<<<<<<<<<
 *     return tmp1a.reshape(6,3)
 * 
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_v1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_23 = __Pyx_PyInt_From_long(__pyx_v_v2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __pyx_t_22 = __Pyx_PyInt_From_long(__pyx_v_v3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_23);
      PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_22);
      PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_22);
      __pyx_t_2 = 0;
      __pyx_t_23 = 0;
      __pyx_t_22 = 0;
      __pyx_t_22 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_22)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_22);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_22) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_22, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __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_5numpy_ndarray))))) __PYX_ERR(0, 1601, __pyx_L1_error)
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          }
          __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
        }
        __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1601, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L9:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1602
 *         else:
 *             tmp1a=np.array([v1,v2,v3])
 *     return tmp1a.reshape(6,3)             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1602, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1585
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef np.ndarray centroid_obj(np.ndarray[DTYPE_int_t, ndim=4] obj):             # <<<<<<<<<<<<<<
 *     #  geometric center, centroid of OBJ
 *     cdef int i1,i2,i3,num
 */

  /* 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_22);
  __Pyx_XDECREF(__pyx_t_23);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.intsct.centroid_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1606
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double ball_radius(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=2] centroid):
 *     #  this transforms a tetrahedron to a boll which covers the tetrahedron
 */

static double __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_centroid) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  double __pyx_v_dd;
  double __pyx_v_radius;
  PyArrayObject *__pyx_v_v4 = 0;
  PyArrayObject *__pyx_v_v5 = 0;
  PyArrayObject *__pyx_v_v6 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_centroid;
  __Pyx_Buffer __pyx_pybuffer_centroid;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3b;
  __Pyx_Buffer __pyx_pybuffer_tmp3b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v4;
  __Pyx_Buffer __pyx_pybuffer_v4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v5;
  __Pyx_Buffer __pyx_pybuffer_v5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v6;
  __Pyx_Buffer __pyx_pybuffer_v6;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__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;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_11;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_12;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_13;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_14;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_15;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  long __pyx_t_19;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  PyArrayObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  __pyx_t_5numpy_float64_t __pyx_t_28;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_29;
  __pyx_t_5numpy_float64_t __pyx_t_30;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_31;
  __pyx_t_5numpy_float64_t __pyx_t_32;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_33;
  double __pyx_t_34;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ball_radius", 0);
  __pyx_pybuffer_v4.pybuffer.buf = NULL;
  __pyx_pybuffer_v4.refcount = 0;
  __pyx_pybuffernd_v4.data = NULL;
  __pyx_pybuffernd_v4.rcbuffer = &__pyx_pybuffer_v4;
  __pyx_pybuffer_v5.pybuffer.buf = NULL;
  __pyx_pybuffer_v5.refcount = 0;
  __pyx_pybuffernd_v5.data = NULL;
  __pyx_pybuffernd_v5.rcbuffer = &__pyx_pybuffer_v5;
  __pyx_pybuffer_v6.pybuffer.buf = NULL;
  __pyx_pybuffer_v6.refcount = 0;
  __pyx_pybuffernd_v6.data = NULL;
  __pyx_pybuffernd_v6.rcbuffer = &__pyx_pybuffer_v6;
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp3b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3b.refcount = 0;
  __pyx_pybuffernd_tmp3b.data = NULL;
  __pyx_pybuffernd_tmp3b.rcbuffer = &__pyx_pybuffer_tmp3b;
  __pyx_pybuffer_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_centroid.pybuffer.buf = NULL;
  __pyx_pybuffer_centroid.refcount = 0;
  __pyx_pybuffernd_centroid.data = NULL;
  __pyx_pybuffernd_centroid.rcbuffer = &__pyx_pybuffer_centroid;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1606, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron.diminfo[0].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron.diminfo[0].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron.diminfo[1].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron.diminfo[1].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron.diminfo[2].strides = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron.diminfo[2].shape = __pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer, (PyObject*)__pyx_v_centroid, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1606, __pyx_L1_error)
  }
  __pyx_pybuffernd_centroid.diminfo[0].strides = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_centroid.diminfo[0].shape = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_centroid.diminfo[1].strides = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_centroid.diminfo[1].shape = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1617
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3b
 * 
 *     counter=0             # <<<<<<<<<<<<<<
 *     tmp1a=np.array([0])
 *     for i1 in range(4):
 */
  __pyx_v_counter = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1618
 * 
 *     counter=0
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     for i1 in range(4):
 *         for i2 in range(6):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __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(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1618, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1618, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1619
 *     counter=0
 *     tmp1a=np.array([0])
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         for i2 in range(6):
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])
 */
  for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/intsct.pyx":1620
 *     tmp1a=np.array([0])
 *     for i1 in range(4):
 *         for i2 in range(6):             # <<<<<<<<<<<<<<
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])
 *             if counter!=0:
 */
    for (__pyx_t_10 = 0; __pyx_t_10 < 6; __pyx_t_10+=1) {
      __pyx_v_i2 = __pyx_t_10;

      /* "pyqcstrc/icosah/intsct.pyx":1621
 *     for i1 in range(4):
 *         for i2 in range(6):
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])             # <<<<<<<<<<<<<<
 *             if counter!=0:
 *                 tmp1a=np.append(tmp1a,[w1,w2,w3])
 */
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_16 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_16 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(__pyx_t_3 != Py_None)) {
        PyObject* sequence = __pyx_t_3;
        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(0, 1621, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1621, __pyx_L1_error)
      }
      __pyx_t_17 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_17 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_18 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_19 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_w1 = __pyx_t_17;
      __pyx_v_w2 = __pyx_t_18;
      __pyx_v_w3 = __pyx_t_19;

      /* "pyqcstrc/icosah/intsct.pyx":1622
 *         for i2 in range(6):
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])
 *             if counter!=0:             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp1a,[w1,w2,w3])
 *             else:
 */
      __pyx_t_20 = ((__pyx_v_counter != 0) != 0);
      if (__pyx_t_20) {

        /* "pyqcstrc/icosah/intsct.pyx":1623
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])
 *             if counter!=0:
 *                 tmp1a=np.append(tmp1a,[w1,w2,w3])             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.array([w1,w2,w3])
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_21 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        __pyx_t_22 = PyList_New(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_22);
        __Pyx_GIVEREF(__pyx_t_4);
        PyList_SET_ITEM(__pyx_t_22, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_1);
        PyList_SET_ITEM(__pyx_t_22, 1, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_21);
        PyList_SET_ITEM(__pyx_t_22, 2, __pyx_t_21);
        __pyx_t_4 = 0;
        __pyx_t_1 = 0;
        __pyx_t_21 = 0;
        __pyx_t_21 = NULL;
        __pyx_t_23 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_21)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_21);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_23 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_21, ((PyObject *)__pyx_v_tmp1a), __pyx_t_22};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_21, ((PyObject *)__pyx_v_tmp1a), __pyx_t_22};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__pyx_t_21) {
            __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_21); __pyx_t_21 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_23, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_22);
          PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_23, __pyx_t_22);
          __pyx_t_22 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1623, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_23 < 0)) {
            PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            }
            __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1622
 *         for i2 in range(6):
 *             w1,w2,w3=sub(centroid[i2][0],centroid[i2][1],centroid[i2][2],tetrahedron[i1][i2][0],tetrahedron[i1][i2][1],tetrahedron[i1][i2][2])
 *             if counter!=0:             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp1a,[w1,w2,w3])
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1625
 *                 tmp1a=np.append(tmp1a,[w1,w2,w3])
 *             else:
 *                 tmp1a=np.array([w1,w2,w3])             # <<<<<<<<<<<<<<
 *                 counter+=1
 *     tmp3b=tmp1a.reshape(4,6,3)
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_22 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_22);
        __pyx_t_21 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1625, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_22);
        PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_22);
        __Pyx_GIVEREF(__pyx_t_21);
        PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_21);
        __pyx_t_2 = 0;
        __pyx_t_22 = 0;
        __pyx_t_21 = 0;
        __pyx_t_21 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_21)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_21);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_3 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_21, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __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_5numpy_ndarray))))) __PYX_ERR(0, 1625, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_23 < 0)) {
            PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            }
            __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
          }
          __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/intsct.pyx":1626
 *             else:
 *                 tmp1a=np.array([w1,w2,w3])
 *                 counter+=1             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1a.reshape(4,6,3)
 *     radius=0.0
 */
        __pyx_v_counter = (__pyx_v_counter + 1);
      }
      __pyx_L7:;
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":1627
 *                 tmp1a=np.array([w1,w2,w3])
 *                 counter+=1
 *     tmp3b=tmp1a.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *     radius=0.0
 *     for i1 in range(4):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1627, __pyx_L1_error)
  __pyx_t_24 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
      __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
    }
    __pyx_pybuffernd_tmp3b.diminfo[0].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3b.diminfo[0].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3b.diminfo[1].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3b.diminfo[1].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3b.diminfo[2].strides = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3b.diminfo[2].shape = __pyx_pybuffernd_tmp3b.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error)
  }
  __pyx_t_24 = 0;
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1628
 *                 counter+=1
 *     tmp3b=tmp1a.reshape(4,6,3)
 *     radius=0.0             # <<<<<<<<<<<<<<
 *     for i1 in range(4):
 *         #v1,v2,v3,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 */
  __pyx_v_radius = 0.0;

  /* "pyqcstrc/icosah/intsct.pyx":1629
 *     tmp3b=tmp1a.reshape(4,6,3)
 *     radius=0.0
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         #v1,v2,v3,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         _,_,_,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 */
  for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/intsct.pyx":1631
 *     for i1 in range(4):
 *         #v1,v2,v3,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         _,_,_,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])             # <<<<<<<<<<<<<<
 *         dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *         if dd>radius:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __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_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_21) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_21, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_1, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_25) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_25, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_21), ((PyArrayObject *)__pyx_t_22), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_25), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (likely(__pyx_t_1 != Py_None)) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 6)) {
        if (size > 6) __Pyx_RaiseTooManyValuesError(6);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1631, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_25 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_22 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_21 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 5); 
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_22);
      __Pyx_INCREF(__pyx_t_21);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[6] = {&__pyx_t_25,&__pyx_t_2,&__pyx_t_22,&__pyx_t_21,&__pyx_t_4,&__pyx_t_3};
        for (i=0; i < 6; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1631, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_21) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_21, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_25);
    __pyx_t_25 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v__, __pyx_t_22);
    __pyx_t_22 = 0;
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_21);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_v_v4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
        __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_v4.diminfo[0].strides = __pyx_pybuffernd_v4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v4.diminfo[0].shape = __pyx_pybuffernd_v4.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1631, __pyx_L1_error)
    }
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v4, ((PyArrayObject *)__pyx_t_21));
    __pyx_t_21 = 0;
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_v_v5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        }
        __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
      }
      __pyx_pybuffernd_v5.diminfo[0].strides = __pyx_pybuffernd_v5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v5.diminfo[0].shape = __pyx_pybuffernd_v5.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1631, __pyx_L1_error)
    }
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v5, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_v_v6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
        __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_v6.diminfo[0].strides = __pyx_pybuffernd_v6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v6.diminfo[0].shape = __pyx_pybuffernd_v6.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1631, __pyx_L1_error)
    }
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v6, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/intsct.pyx":1632
 *         #v1,v2,v3,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         _,_,_,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)             # <<<<<<<<<<<<<<
 *         if dd>radius:
 *             radius=dd
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_26 = 0;
    __pyx_t_27 = 1;
    __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v4.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_v4.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_27 = 2;
    __pyx_t_29 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_v4.diminfo[0].strides));
    if (unlikely(__pyx_t_29 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1632, __pyx_L1_error)
    }
    __pyx_t_27 = 0;
    __pyx_t_26 = 1;
    __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_v5.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v5.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_26 = 2;
    __pyx_t_31 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v5.diminfo[0].strides));
    if (unlikely(__pyx_t_31 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1632, __pyx_L1_error)
    }
    __pyx_t_26 = 0;
    __pyx_t_27 = 1;
    __pyx_t_32 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v6.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_v6.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
    __pyx_t_27 = 2;
    __pyx_t_33 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_v6.diminfo[0].strides));
    if (unlikely(__pyx_t_33 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1632, __pyx_L1_error)
    }
    __pyx_t_3 = PyFloat_FromDouble(((pow((__pyx_t_28 / ((__pyx_t_5numpy_float64_t)__pyx_t_29)), 2.0) + pow((__pyx_t_30 / ((__pyx_t_5numpy_float64_t)__pyx_t_31)), 2.0)) + pow((__pyx_t_32 / ((__pyx_t_5numpy_float64_t)__pyx_t_33)), 2.0))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_21 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_21)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_21);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_21, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_34 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_34 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_dd = __pyx_t_34;

    /* "pyqcstrc/icosah/intsct.pyx":1633
 *         _,_,_,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *         if dd>radius:             # <<<<<<<<<<<<<<
 *             radius=dd
 *         else:
 */
    __pyx_t_20 = ((__pyx_v_dd > __pyx_v_radius) != 0);
    if (__pyx_t_20) {

      /* "pyqcstrc/icosah/intsct.pyx":1634
 *         dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *         if dd>radius:
 *             radius=dd             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_radius = __pyx_v_dd;

      /* "pyqcstrc/icosah/intsct.pyx":1633
 *         _,_,_,v4,v5,v6=projection(tmp3b[i1][0],tmp3b[i1][1],tmp3b[i1][2],tmp3b[i1][3],tmp3b[i1][4],tmp3b[i1][5])
 *         dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *         if dd>radius:             # <<<<<<<<<<<<<<
 *             radius=dd
 *         else:
 */
      goto __pyx_L10;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1636
 *             radius=dd
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     return radius
 * 
 */
    /*else*/ {
    }
    __pyx_L10:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1637
 *         else:
 *             pass
 *     return radius             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __pyx_r = __pyx_v_radius;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1606
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double ball_radius(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=2] centroid):
 *     #  this transforms a tetrahedron to a boll which covers the tetrahedron
 */

  /* 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_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_25);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.ball_radius", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v4);
  __Pyx_XDECREF((PyObject *)__pyx_v_v5);
  __Pyx_XDECREF((PyObject *)__pyx_v_v6);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1641
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double ball_radius_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=2] centroid):
 *     #  this transforms an OBJ to a boll which covers the OBJ
 */

static double __pyx_f_8pyqcstrc_6icosah_6intsct_ball_radius_obj(PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_centroid) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_num1;
  int __pyx_v_counter;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  double __pyx_v_dd;
  double __pyx_v_radius;
  PyArrayObject *__pyx_v_v4 = 0;
  PyArrayObject *__pyx_v_v5 = 0;
  PyArrayObject *__pyx_v_v6 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_centroid;
  __Pyx_Buffer __pyx_pybuffer_centroid;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v4;
  __Pyx_Buffer __pyx_pybuffer_v4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v5;
  __Pyx_Buffer __pyx_pybuffer_v5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v6;
  __Pyx_Buffer __pyx_pybuffer_v6;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_15;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_16;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_17;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_18;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_19;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_20;
  long __pyx_t_21;
  long __pyx_t_22;
  long __pyx_t_23;
  int __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_t_27;
  PyArrayObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  __pyx_t_5numpy_float64_t __pyx_t_32;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_33;
  __pyx_t_5numpy_float64_t __pyx_t_34;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_35;
  __pyx_t_5numpy_float64_t __pyx_t_36;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_37;
  double __pyx_t_38;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ball_radius_obj", 0);
  __pyx_pybuffer_v4.pybuffer.buf = NULL;
  __pyx_pybuffer_v4.refcount = 0;
  __pyx_pybuffernd_v4.data = NULL;
  __pyx_pybuffernd_v4.rcbuffer = &__pyx_pybuffer_v4;
  __pyx_pybuffer_v5.pybuffer.buf = NULL;
  __pyx_pybuffer_v5.refcount = 0;
  __pyx_pybuffernd_v5.data = NULL;
  __pyx_pybuffernd_v5.rcbuffer = &__pyx_pybuffer_v5;
  __pyx_pybuffer_v6.pybuffer.buf = NULL;
  __pyx_pybuffer_v6.refcount = 0;
  __pyx_pybuffernd_v6.data = NULL;
  __pyx_pybuffernd_v6.rcbuffer = &__pyx_pybuffer_v6;
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_obj.pybuffer.buf = NULL;
  __pyx_pybuffer_obj.refcount = 0;
  __pyx_pybuffernd_obj.data = NULL;
  __pyx_pybuffernd_obj.rcbuffer = &__pyx_pybuffer_obj;
  __pyx_pybuffer_centroid.pybuffer.buf = NULL;
  __pyx_pybuffer_centroid.refcount = 0;
  __pyx_pybuffernd_centroid.data = NULL;
  __pyx_pybuffernd_centroid.rcbuffer = &__pyx_pybuffer_centroid;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj.diminfo[0].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj.diminfo[0].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj.diminfo[1].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj.diminfo[1].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj.diminfo[2].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj.diminfo[2].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj.diminfo[3].strides = __pyx_pybuffernd_obj.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj.diminfo[3].shape = __pyx_pybuffernd_obj.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer, (PyObject*)__pyx_v_centroid, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  }
  __pyx_pybuffernd_centroid.diminfo[0].strides = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_centroid.diminfo[0].shape = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_centroid.diminfo[1].strides = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_centroid.diminfo[1].shape = __pyx_pybuffernd_centroid.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1652
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     counter=0             # <<<<<<<<<<<<<<
 *     tmp1a=np.array([0])
 *     num1=len(obj)
 */
  __pyx_v_counter = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1653
 * 
 *     counter=0
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     num1=len(obj)
 *     for i1 in range(num1):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __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(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1653, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1653, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1654
 *     counter=0
 *     tmp1a=np.array([0])
 *     num1=len(obj)             # <<<<<<<<<<<<<<
 *     for i1 in range(num1):
 *         for i2 in range(4):
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1654, __pyx_L1_error)
  __pyx_v_num1 = __pyx_t_10;

  /* "pyqcstrc/icosah/intsct.pyx":1655
 *     tmp1a=np.array([0])
 *     num1=len(obj)
 *     for i1 in range(num1):             # <<<<<<<<<<<<<<
 *         for i2 in range(4):
 *             for i3 in range(6):
 */
  __pyx_t_6 = __pyx_v_num1;
  __pyx_t_11 = __pyx_t_6;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i1 = __pyx_t_12;

    /* "pyqcstrc/icosah/intsct.pyx":1656
 *     num1=len(obj)
 *     for i1 in range(num1):
 *         for i2 in range(4):             # <<<<<<<<<<<<<<
 *             for i3 in range(6):
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 */
    for (__pyx_t_13 = 0; __pyx_t_13 < 4; __pyx_t_13+=1) {
      __pyx_v_i2 = __pyx_t_13;

      /* "pyqcstrc/icosah/intsct.pyx":1657
 *     for i1 in range(num1):
 *         for i2 in range(4):
 *             for i3 in range(6):             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *                 if counter!=0:
 */
      for (__pyx_t_14 = 0; __pyx_t_14 < 6; __pyx_t_14+=1) {
        __pyx_v_i3 = __pyx_t_14;

        /* "pyqcstrc/icosah/intsct.pyx":1658
 *         for i2 in range(4):
 *             for i3 in range(6):
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])             # <<<<<<<<<<<<<<
 *                 if counter!=0:
 *                     tmp1a=np.append(tmp1a,[w1,w2,w3])
 */
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_15 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_16 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_16 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_centroid), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_17 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_17 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_18 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_19 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_20 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_20 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (likely(__pyx_t_1 != Py_None)) {
          PyObject* sequence = __pyx_t_1;
          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(0, 1658, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1658, __pyx_L1_error)
        }
        __pyx_t_21 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_21 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_w1 = __pyx_t_21;
        __pyx_v_w2 = __pyx_t_22;
        __pyx_v_w3 = __pyx_t_23;

        /* "pyqcstrc/icosah/intsct.pyx":1659
 *             for i3 in range(6):
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *                 if counter!=0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,[w1,w2,w3])
 *                 else:
 */
        __pyx_t_24 = ((__pyx_v_counter != 0) != 0);
        if (__pyx_t_24) {

          /* "pyqcstrc/icosah/intsct.pyx":1660
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *                 if counter!=0:
 *                     tmp1a=np.append(tmp1a,[w1,w2,w3])             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.array([w1,w2,w3])
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_GIVEREF(__pyx_t_4);
          PyList_SET_ITEM(__pyx_t_26, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_3);
          PyList_SET_ITEM(__pyx_t_26, 1, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_25);
          PyList_SET_ITEM(__pyx_t_26, 2, __pyx_t_25);
          __pyx_t_4 = 0;
          __pyx_t_3 = 0;
          __pyx_t_25 = 0;
          __pyx_t_25 = NULL;
          __pyx_t_27 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_25)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_25);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_27 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_25, ((PyObject *)__pyx_v_tmp1a), __pyx_t_26};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_25, ((PyObject *)__pyx_v_tmp1a), __pyx_t_26};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_27); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_25) {
              __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_25); __pyx_t_25 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_27, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_26);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_27, __pyx_t_26);
            __pyx_t_26 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __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 (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1660, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_27 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_27 < 0)) {
              PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              }
              __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_27 < 0)) __PYX_ERR(0, 1660, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1659
 *             for i3 in range(6):
 *                 w1,w2,w3=sub(centroid[i3][0],centroid[i3][1],centroid[i3][2],obj[i1][i2][i3][0],obj[i1][i2][i3][1],obj[i1][i2][i3][2])
 *                 if counter!=0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,[w1,w2,w3])
 *                 else:
 */
          goto __pyx_L9;
        }

        /* "pyqcstrc/icosah/intsct.pyx":1662
 *                     tmp1a=np.append(tmp1a,[w1,w2,w3])
 *                 else:
 *                     tmp1a=np.array([w1,w2,w3])             # <<<<<<<<<<<<<<
 *                     counter+=1
 *     tmp4a=tmp1a.reshape(num1,4,6,3)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_26 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __pyx_t_25 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_26);
          PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_26);
          __Pyx_GIVEREF(__pyx_t_25);
          PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_25);
          __pyx_t_2 = 0;
          __pyx_t_26 = 0;
          __pyx_t_25 = 0;
          __pyx_t_25 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_25)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_25);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_1 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_25, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1662, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_27 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_27 < 0)) {
              PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              }
              __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
            }
            __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_27 < 0)) __PYX_ERR(0, 1662, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/intsct.pyx":1663
 *                 else:
 *                     tmp1a=np.array([w1,w2,w3])
 *                     counter+=1             # <<<<<<<<<<<<<<
 *     tmp4a=tmp1a.reshape(num1,4,6,3)
 *     radius=0.0
 */
          __pyx_v_counter = (__pyx_v_counter + 1);
        }
        __pyx_L9:;
      }
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":1664
 *                     tmp1a=np.array([w1,w2,w3])
 *                     counter+=1
 *     tmp4a=tmp1a.reshape(num1,4,6,3)             # <<<<<<<<<<<<<<
 *     radius=0.0
 *     for i1 in range(num1):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_num1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_25 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_25, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_25, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_26 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    if (__pyx_t_25) {
      __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_25); __pyx_t_25 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_INCREF(__pyx_int_4);
    __Pyx_GIVEREF(__pyx_int_4);
    PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_6, __pyx_int_4);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_26, 2+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_26, 3+__pyx_t_6, __pyx_int_3);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1664, __pyx_L1_error)
  __pyx_t_28 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
      __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
    }
    __pyx_pybuffernd_tmp4a.diminfo[0].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4a.diminfo[0].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4a.diminfo[1].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4a.diminfo[1].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4a.diminfo[2].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4a.diminfo[2].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4a.diminfo[3].strides = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4a.diminfo[3].shape = __pyx_pybuffernd_tmp4a.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1664, __pyx_L1_error)
  }
  __pyx_t_28 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1665
 *                     counter+=1
 *     tmp4a=tmp1a.reshape(num1,4,6,3)
 *     radius=0.0             # <<<<<<<<<<<<<<
 *     for i1 in range(num1):
 *         for i2 in range(4):
 */
  __pyx_v_radius = 0.0;

  /* "pyqcstrc/icosah/intsct.pyx":1666
 *     tmp4a=tmp1a.reshape(num1,4,6,3)
 *     radius=0.0
 *     for i1 in range(num1):             # <<<<<<<<<<<<<<
 *         for i2 in range(4):
 *             #v1,v2,v3,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 */
  __pyx_t_6 = __pyx_v_num1;
  __pyx_t_11 = __pyx_t_6;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i1 = __pyx_t_12;

    /* "pyqcstrc/icosah/intsct.pyx":1667
 *     radius=0.0
 *     for i1 in range(num1):
 *         for i2 in range(4):             # <<<<<<<<<<<<<<
 *             #v1,v2,v3,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             _,_,_,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 */
    for (__pyx_t_13 = 0; __pyx_t_13 < 4; __pyx_t_13+=1) {
      __pyx_v_i2 = __pyx_t_13;

      /* "pyqcstrc/icosah/intsct.pyx":1669
 *         for i2 in range(4):
 *             #v1,v2,v3,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             _,_,_,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])             # <<<<<<<<<<<<<<
 *             dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *             if dd>radius:
 */
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_26, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_26, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_25, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_25 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_25, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_25) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_25, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_29);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_29, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __pyx_t_29 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_26), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_25), ((PyArrayObject *)__pyx_t_2), 0); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_29);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(__pyx_t_29 != Py_None)) {
        PyObject* sequence = __pyx_t_29;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 6)) {
          if (size > 6) __Pyx_RaiseTooManyValuesError(6);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1669, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_25 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_26 = PyList_GET_ITEM(sequence, 3); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 4); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 5); 
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_25);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_26);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_25,&__pyx_t_4,&__pyx_t_26,&__pyx_t_3,&__pyx_t_1};
          for (i=0; i < 6; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1669, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
        __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1669, __pyx_L1_error)
      }
      if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v__, __pyx_t_25);
      __pyx_t_25 = 0;
      __Pyx_DECREF_SET(__pyx_v__, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_26);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
        __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_v_v4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          }
          __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
        }
        __pyx_pybuffernd_v4.diminfo[0].strides = __pyx_pybuffernd_v4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v4.diminfo[0].shape = __pyx_pybuffernd_v4.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v4, ((PyArrayObject *)__pyx_t_26));
      __pyx_t_26 = 0;
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
        __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 0)) {
          PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_v_v5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          }
          __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
        }
        __pyx_pybuffernd_v5.diminfo[0].strides = __pyx_pybuffernd_v5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v5.diminfo[0].shape = __pyx_pybuffernd_v5.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v5, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
        __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_v_v6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          }
          __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
        }
        __pyx_pybuffernd_v6.diminfo[0].strides = __pyx_pybuffernd_v6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v6.diminfo[0].shape = __pyx_pybuffernd_v6.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v6, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1670
 *             #v1,v2,v3,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             _,_,_,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)             # <<<<<<<<<<<<<<
 *             if dd>radius:
 *                 radius=dd
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_30 = 0;
      __pyx_t_31 = 1;
      __pyx_t_32 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_v4.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_v4.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
      __pyx_t_31 = 2;
      __pyx_t_33 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_v4.diminfo[0].strides));
      if (unlikely(__pyx_t_33 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1670, __pyx_L1_error)
      }
      __pyx_t_31 = 0;
      __pyx_t_30 = 1;
      __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_v5.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_v5.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
      __pyx_t_30 = 2;
      __pyx_t_35 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_v5.diminfo[0].strides));
      if (unlikely(__pyx_t_35 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1670, __pyx_L1_error)
      }
      __pyx_t_30 = 0;
      __pyx_t_31 = 1;
      __pyx_t_36 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_v6.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_v6.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
      __pyx_t_31 = 2;
      __pyx_t_37 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_v6.diminfo[0].strides));
      if (unlikely(__pyx_t_37 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1670, __pyx_L1_error)
      }
      __pyx_t_1 = PyFloat_FromDouble(((pow((__pyx_t_32 / ((__pyx_t_5numpy_float64_t)__pyx_t_33)), 2.0) + pow((__pyx_t_34 / ((__pyx_t_5numpy_float64_t)__pyx_t_35)), 2.0)) + pow((__pyx_t_36 / ((__pyx_t_5numpy_float64_t)__pyx_t_37)), 2.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_26 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_26)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_26);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_29 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_26, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_29);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_38 = __pyx_PyFloat_AsDouble(__pyx_t_29); if (unlikely((__pyx_t_38 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
      __pyx_v_dd = __pyx_t_38;

      /* "pyqcstrc/icosah/intsct.pyx":1671
 *             _,_,_,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *             if dd>radius:             # <<<<<<<<<<<<<<
 *                 radius=dd
 *             else:
 */
      __pyx_t_24 = ((__pyx_v_dd > __pyx_v_radius) != 0);
      if (__pyx_t_24) {

        /* "pyqcstrc/icosah/intsct.pyx":1672
 *             dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *             if dd>radius:
 *                 radius=dd             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_radius = __pyx_v_dd;

        /* "pyqcstrc/icosah/intsct.pyx":1671
 *             _,_,_,v4,v5,v6=projection(tmp4a[i1][i2][0],tmp4a[i1][i2][1],tmp4a[i1][i2][2],tmp4a[i1][i2][3],tmp4a[i1][i2][4],tmp4a[i1][i2][5])
 *             dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *             if dd>radius:             # <<<<<<<<<<<<<<
 *                 radius=dd
 *             else:
 */
        goto __pyx_L14;
      }

      /* "pyqcstrc/icosah/intsct.pyx":1674
 *                 radius=dd
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *     return radius
 * 
 */
      /*else*/ {
      }
      __pyx_L14:;
    }
  }

  /* "pyqcstrc/icosah/intsct.pyx":1675
 *             else:
 *                 pass
 *     return radius             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __pyx_r = __pyx_v_radius;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1641
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double ball_radius_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=2] centroid):
 *     #  this transforms an OBJ to a boll which covers the OBJ
 */

  /* 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_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_29);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.ball_radius_obj", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_centroid.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v4);
  __Pyx_XDECREF((PyObject *)__pyx_v_v5);
  __Pyx_XDECREF((PyObject *)__pyx_v_v6);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/intsct.pyx":1679
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double distance_in_perp_space(np.ndarray[DTYPE_int_t, ndim=2] pos1,             # <<<<<<<<<<<<<<
 *                              np.ndarray[DTYPE_int_t, ndim=2] pos2):
 *     cdef int i1
 */

static double __pyx_f_8pyqcstrc_6icosah_6intsct_distance_in_perp_space(PyArrayObject *__pyx_v_pos1, PyArrayObject *__pyx_v_pos2) {
  int __pyx_v_i1;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  double __pyx_v_dd;
  PyArrayObject *__pyx_v_v4 = 0;
  PyArrayObject *__pyx_v_v5 = 0;
  PyArrayObject *__pyx_v_v6 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos1;
  __Pyx_Buffer __pyx_pybuffer_pos1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos2;
  __Pyx_Buffer __pyx_pybuffer_pos2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v4;
  __Pyx_Buffer __pyx_pybuffer_v4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v5;
  __Pyx_Buffer __pyx_pybuffer_v5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v6;
  __Pyx_Buffer __pyx_pybuffer_v6;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_10;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_11;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_12;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_13;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_14;
  __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t __pyx_t_15;
  long __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  PyArrayObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  __pyx_t_5numpy_float64_t __pyx_t_27;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_28;
  __pyx_t_5numpy_float64_t __pyx_t_29;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_30;
  __pyx_t_5numpy_float64_t __pyx_t_31;
  __pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t __pyx_t_32;
  double __pyx_t_33;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("distance_in_perp_space", 0);
  __pyx_pybuffer_v4.pybuffer.buf = NULL;
  __pyx_pybuffer_v4.refcount = 0;
  __pyx_pybuffernd_v4.data = NULL;
  __pyx_pybuffernd_v4.rcbuffer = &__pyx_pybuffer_v4;
  __pyx_pybuffer_v5.pybuffer.buf = NULL;
  __pyx_pybuffer_v5.refcount = 0;
  __pyx_pybuffernd_v5.data = NULL;
  __pyx_pybuffernd_v5.rcbuffer = &__pyx_pybuffer_v5;
  __pyx_pybuffer_v6.pybuffer.buf = NULL;
  __pyx_pybuffer_v6.refcount = 0;
  __pyx_pybuffernd_v6.data = NULL;
  __pyx_pybuffernd_v6.rcbuffer = &__pyx_pybuffer_v6;
  __pyx_pybuffer_tmp1a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1a.refcount = 0;
  __pyx_pybuffernd_tmp1a.data = NULL;
  __pyx_pybuffernd_tmp1a.rcbuffer = &__pyx_pybuffer_tmp1a;
  __pyx_pybuffer_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __pyx_pybuffer_pos1.pybuffer.buf = NULL;
  __pyx_pybuffer_pos1.refcount = 0;
  __pyx_pybuffernd_pos1.data = NULL;
  __pyx_pybuffernd_pos1.rcbuffer = &__pyx_pybuffer_pos1;
  __pyx_pybuffer_pos2.pybuffer.buf = NULL;
  __pyx_pybuffer_pos2.refcount = 0;
  __pyx_pybuffernd_pos2.data = NULL;
  __pyx_pybuffernd_pos2.rcbuffer = &__pyx_pybuffer_pos2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos1.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1679, __pyx_L1_error)
  }
  __pyx_pybuffernd_pos1.diminfo[0].strides = __pyx_pybuffernd_pos1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos1.diminfo[0].shape = __pyx_pybuffernd_pos1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_pos1.diminfo[1].strides = __pyx_pybuffernd_pos1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_pos1.diminfo[1].shape = __pyx_pybuffernd_pos1.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos2.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1679, __pyx_L1_error)
  }
  __pyx_pybuffernd_pos2.diminfo[0].strides = __pyx_pybuffernd_pos2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos2.diminfo[0].shape = __pyx_pybuffernd_pos2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_pos2.diminfo[1].strides = __pyx_pybuffernd_pos2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_pos2.diminfo[1].shape = __pyx_pybuffernd_pos2.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/intsct.pyx":1688
 *     cdef np.ndarray[DTYPE_int_t,ndim=2] tmp2a
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     for i1 in range(6):
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __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(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1688, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1689
 * 
 *     tmp1a=np.array([0])
 *     for i1 in range(6):             # <<<<<<<<<<<<<<
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])
 *         if i1!=0:
 */
  for (__pyx_t_6 = 0; __pyx_t_6 < 6; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/intsct.pyx":1690
 *     tmp1a=np.array([0])
 *     for i1 in range(6):
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])             # <<<<<<<<<<<<<<
 *         if i1!=0:
 *             tmp1a=np.append(tmp1a,[w1,w2,w3])
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_13 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_13 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos2), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_15 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __pyx_f_8pyqcstrc_6icosah_5math1_sub(__pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(__pyx_t_1 != Py_None)) {
      PyObject* sequence = __pyx_t_1;
      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(0, 1690, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1690, __pyx_L1_error)
    }
    __pyx_t_16 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_16 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_17 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_17 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_18 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_w1 = __pyx_t_16;
    __pyx_v_w2 = __pyx_t_17;
    __pyx_v_w3 = __pyx_t_18;

    /* "pyqcstrc/icosah/intsct.pyx":1691
 *     for i1 in range(6):
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])
 *         if i1!=0:             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,[w1,w2,w3])
 *         else:
 */
    __pyx_t_19 = ((__pyx_v_i1 != 0) != 0);
    if (__pyx_t_19) {

      /* "pyqcstrc/icosah/intsct.pyx":1692
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])
 *         if i1!=0:
 *             tmp1a=np.append(tmp1a,[w1,w2,w3])             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=np.array([w1,w2,w3])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_21 = PyList_New(3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_21, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_21, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_21, 2, __pyx_t_20);
      __pyx_t_4 = 0;
      __pyx_t_3 = 0;
      __pyx_t_20 = 0;
      __pyx_t_20 = NULL;
      __pyx_t_22 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_20)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_20);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_22 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_20, ((PyObject *)__pyx_v_tmp1a), __pyx_t_21};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_20, ((PyObject *)__pyx_v_tmp1a), __pyx_t_21};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__pyx_t_20) {
          __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __pyx_t_20 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_22, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_22, __pyx_t_21);
        __pyx_t_21 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __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 (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1692, __pyx_L1_error)
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_22 < 0)) {
          PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          }
          __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
        }
        __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_22 < 0)) __PYX_ERR(0, 1692, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/intsct.pyx":1691
 *     for i1 in range(6):
 *         w1,w2,w3=sub(pos1[i1][0],pos1[i1][1],pos1[i1][2],pos2[i1][0],pos2[i1][1],pos2[i1][2])
 *         if i1!=0:             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,[w1,w2,w3])
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/intsct.pyx":1694
 *             tmp1a=np.append(tmp1a,[w1,w2,w3])
 *         else:
 *             tmp1a=np.array([w1,w2,w3])             # <<<<<<<<<<<<<<
 *     tmp2a=tmp1a.reshape(6,3)
 *     #v1,v2,v3,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_w1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_21 = __Pyx_PyInt_From_long(__pyx_v_w2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_20 = __Pyx_PyInt_From_long(__pyx_v_w3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_21);
      PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_20);
      __pyx_t_2 = 0;
      __pyx_t_21 = 0;
      __pyx_t_20 = 0;
      __pyx_t_20 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_20)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_20);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_20, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1694, __pyx_L1_error)
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_22 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          }
          __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
        }
        __pyx_pybuffernd_tmp1a.diminfo[0].strides = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1a.diminfo[0].shape = __pyx_pybuffernd_tmp1a.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_22 < 0)) __PYX_ERR(0, 1694, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L5:;
  }

  /* "pyqcstrc/icosah/intsct.pyx":1695
 *         else:
 *             tmp1a=np.array([w1,w2,w3])
 *     tmp2a=tmp1a.reshape(6,3)             # <<<<<<<<<<<<<<
 *     #v1,v2,v3,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 *     _,_,_,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1695, __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_5numpy_ndarray))))) __PYX_ERR(0, 1695, __pyx_L1_error)
  __pyx_t_23 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
      __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
    }
    __pyx_pybuffernd_tmp2a.diminfo[0].strides = __pyx_pybuffernd_tmp2a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2a.diminfo[0].shape = __pyx_pybuffernd_tmp2a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2a.diminfo[1].strides = __pyx_pybuffernd_tmp2a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2a.diminfo[1].shape = __pyx_pybuffernd_tmp2a.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1695, __pyx_L1_error)
  }
  __pyx_t_23 = 0;
  __pyx_v_tmp2a = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1697
 *     tmp2a=tmp1a.reshape(6,3)
 *     #v1,v2,v3,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 *     _,_,_,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])             # <<<<<<<<<<<<<<
 *     dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *     return dd
 */
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_20 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_21 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (!(likely(((__pyx_t_21) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_21, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp2a), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_t_24 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_20), ((PyArrayObject *)__pyx_t_21), ((PyArrayObject *)__pyx_t_2), 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(__pyx_t_24 != Py_None)) {
    PyObject* sequence = __pyx_t_24;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 6)) {
      if (size > 6) __Pyx_RaiseTooManyValuesError(6);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1697, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_21 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_20 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
    __pyx_t_1 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 5); 
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_21);
    __Pyx_INCREF(__pyx_t_20);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_21,&__pyx_t_20,&__pyx_t_4,&__pyx_t_1,&__pyx_t_3};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1697, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1697, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1697, __pyx_L1_error)
  __pyx_v__ = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_21);
  __pyx_t_21 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_20);
  __pyx_t_20 = 0;
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v4.rcbuffer->pybuffer, (PyObject*)__pyx_v_v4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_v4.diminfo[0].strides = __pyx_pybuffernd_v4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v4.diminfo[0].shape = __pyx_pybuffernd_v4.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1697, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_v4 = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v5.rcbuffer->pybuffer, (PyObject*)__pyx_v_v5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
      __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0;
    }
    __pyx_pybuffernd_v5.diminfo[0].strides = __pyx_pybuffernd_v5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v5.diminfo[0].shape = __pyx_pybuffernd_v5.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1697, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_v5 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v6.rcbuffer->pybuffer, (PyObject*)__pyx_v_v6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
    }
    __pyx_pybuffernd_v6.diminfo[0].strides = __pyx_pybuffernd_v6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v6.diminfo[0].shape = __pyx_pybuffernd_v6.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1697, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_v6 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":1698
 *     #v1,v2,v3,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 *     _,_,_,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 *     dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)             # <<<<<<<<<<<<<<
 *     return dd
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_25 = 0;
  __pyx_t_26 = 1;
  __pyx_t_27 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_v4.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v4.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
  __pyx_t_26 = 2;
  __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v4.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v4.diminfo[0].strides));
  if (unlikely(__pyx_t_28 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1698, __pyx_L1_error)
  }
  __pyx_t_26 = 0;
  __pyx_t_25 = 1;
  __pyx_t_29 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v5.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_v5.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
  __pyx_t_25 = 2;
  __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v5.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_v5.diminfo[0].strides));
  if (unlikely(__pyx_t_30 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1698, __pyx_L1_error)
  }
  __pyx_t_25 = 0;
  __pyx_t_26 = 1;
  __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_v6.diminfo[0].strides)) + ((*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v6.diminfo[0].strides)) * __pyx_v_8pyqcstrc_6icosah_6intsct_TAU));
  __pyx_t_26 = 2;
  __pyx_t_32 = (*__Pyx_BufPtrStrided1d(__pyx_t_8pyqcstrc_6icosah_6intsct_DTYPE_int_t *, __pyx_pybuffernd_v6.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_v6.diminfo[0].strides));
  if (unlikely(__pyx_t_32 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1698, __pyx_L1_error)
  }
  __pyx_t_3 = PyFloat_FromDouble(((pow((__pyx_t_27 / ((__pyx_t_5numpy_float64_t)__pyx_t_28)), 2.0) + pow((__pyx_t_29 / ((__pyx_t_5numpy_float64_t)__pyx_t_30)), 2.0)) + pow((__pyx_t_31 / ((__pyx_t_5numpy_float64_t)__pyx_t_32)), 2.0))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_24 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_33 = __pyx_PyFloat_AsDouble(__pyx_t_24); if (unlikely((__pyx_t_33 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __pyx_v_dd = __pyx_t_33;

  /* "pyqcstrc/icosah/intsct.pyx":1699
 *     _,_,_,v4,v5,v6=projection(tmp2a[0],tmp2a[1],tmp2a[2],tmp2a[3],tmp2a[4],tmp2a[5])
 *     dd=np.sqrt(((v4[0]+v4[1]*TAU)/v4[2])**2+((v5[0]+v5[1]*TAU)/v5[2])**2+((v6[0]+v6[1]*TAU)/v6[2])**2)
 *     return dd             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_dd;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/intsct.pyx":1679
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * cdef double distance_in_perp_space(np.ndarray[DTYPE_int_t, ndim=2] pos1,             # <<<<<<<<<<<<<<
 *                              np.ndarray[DTYPE_int_t, ndim=2] pos2):
 *     cdef int i1
 */

  /* 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_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_24);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.intsct.distance_in_perp_space", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v6.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v4);
  __Pyx_XDECREF((PyObject *)__pyx_v_v5);
  __Pyx_XDECREF((PyObject *)__pyx_v_v6);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":735
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":736
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":735
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":738
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":739
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":738
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":741
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":742
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":741
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":744
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":745
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":744
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":747
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":748
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":747
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":750
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":751
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":752
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":751
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":754
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":750
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":931
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_array_base", 0);

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":933
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":931
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":935
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":936
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":937
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":938
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":937
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":939
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":935
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":943
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":945
 * cdef inline int import_array() except -1:
 *     try:
 *         __pyx_import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 945, __pyx_L3_error)

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":946
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 946, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":947
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 947, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 947, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    __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:;
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":943
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":949
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":951
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 951, __pyx_L3_error)

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":952
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 952, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":953
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 953, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __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:;
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":949
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":955
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":957
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L3_error)

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":958
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":959
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef extern from *:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 959, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __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:;
  }

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":955
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":969
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":981
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":969
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":984
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime64_object", 0);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":996
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":984
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":999
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1006
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":999
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1009
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1013
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1009
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

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

/* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

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

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1020
 *     returns the unit part of the dtype for a numpy datetime64 object.
 *     """
 *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
  goto __pyx_L0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

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

static PyMethodDef __pyx_methods[] = {
  {"intersection_two_obj_convex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_1intersection_two_obj_convex, METH_VARARGS|METH_KEYWORDS, 0},
  {"intersection_two_obj", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_3intersection_two_obj, METH_VARARGS|METH_KEYWORDS, 0},
  {"intersection_using_tetrahedron_4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_5intersection_using_tetrahedron_4, METH_VARARGS|METH_KEYWORDS, 0},
  {"intersection_tetrahedron_obj_4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_7intersection_tetrahedron_obj_4, METH_VARARGS|METH_KEYWORDS, 0},
  {"intersection_two_tetrahedron_4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_9intersection_two_tetrahedron_4, METH_VARARGS|METH_KEYWORDS, 0},
  {"tetrahedralization_points", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_11tetrahedralization_points, METH_VARARGS|METH_KEYWORDS, 0},
  {"tetrahedralization_1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_13tetrahedralization_1, METH_VARARGS|METH_KEYWORDS, 0},
  {"tetrahedralization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_6intsct_15tetrahedralization, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 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_intsct(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_intsct},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "intsct",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* 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
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_10_8f, __pyx_k_10_8f, sizeof(__pyx_k_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_2d, __pyx_k_2d, sizeof(__pyx_k_2d), 0, 1, 0, 0},
  {&__pyx_kp_u_8_6f, __pyx_k_8_6f, sizeof(__pyx_k_8_6f), 0, 1, 0, 0},
  {&__pyx_n_s_DTYPE_double, __pyx_k_DTYPE_double, sizeof(__pyx_k_DTYPE_double), 0, 0, 1, 1},
  {&__pyx_n_s_DTYPE_int, __pyx_k_DTYPE_int, sizeof(__pyx_k_DTYPE_int), 0, 0, 1, 1},
  {&__pyx_n_s_Delaunay, __pyx_k_Delaunay, sizeof(__pyx_k_Delaunay), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_u_Intersectiong_point, __pyx_k_Intersectiong_point, sizeof(__pyx_k_Intersectiong_point), 0, 1, 0, 0},
  {&__pyx_kp_u_N_of_points_3d, __pyx_k_N_of_points_3d, sizeof(__pyx_k_N_of_points_3d), 0, 1, 0, 0},
  {&__pyx_kp_u_N_of_tetrahedron_3d, __pyx_k_N_of_tetrahedron_3d, sizeof(__pyx_k_N_of_tetrahedron_3d), 0, 1, 0, 0},
  {&__pyx_kp_u_Total, __pyx_k_Total, sizeof(__pyx_k_Total), 0, 1, 0, 0},
  {&__pyx_kp_u_Total_volume, __pyx_k_Total_volume, sizeof(__pyx_k_Total_volume), 0, 1, 0, 0},
  {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
  {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_kp_u_added_point_is_inside_obj, __pyx_k_added_point_is_inside_obj, sizeof(__pyx_k_added_point_is_inside_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_added_point_is_out_of_obj, __pyx_k_added_point_is_out_of_obj, sizeof(__pyx_k_added_point_is_out_of_obj), 0, 1, 0, 0},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 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_kp_u_common_obj, __pyx_k_common_obj, sizeof(__pyx_k_common_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_common_obj_volume, __pyx_k_common_obj_volume, sizeof(__pyx_k_common_obj_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part, __pyx_k_common_part, sizeof(__pyx_k_common_part), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_2, __pyx_k_common_part_2, sizeof(__pyx_k_common_part_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_all_1, __pyx_k_common_part_all_1, sizeof(__pyx_k_common_part_all_1), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_all_1_2, __pyx_k_common_part_all_1_2, sizeof(__pyx_k_common_part_all_1_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_all_2, __pyx_k_common_part_all_2, sizeof(__pyx_k_common_part_all_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_empty, __pyx_k_common_part_empty, sizeof(__pyx_k_common_part_empty), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_empty_2, __pyx_k_common_part_empty_2, sizeof(__pyx_k_common_part_empty_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_partial_1, __pyx_k_common_part_partial_1, sizeof(__pyx_k_common_part_partial_1), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_partial_1_2, __pyx_k_common_part_partial_1_2, sizeof(__pyx_k_common_part_partial_1_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_partial_2, __pyx_k_common_part_partial_2, sizeof(__pyx_k_common_part_partial_2), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_partial_3, __pyx_k_common_part_partial_3, sizeof(__pyx_k_common_part_partial_3), 0, 1, 0, 0},
  {&__pyx_kp_u_common_part_volume, __pyx_k_common_part_volume, sizeof(__pyx_k_common_part_volume), 0, 1, 0, 0},
  {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
  {&__pyx_kp_u_d_th_tet_empty, __pyx_k_d_th_tet_empty, sizeof(__pyx_k_d_th_tet_empty), 0, 1, 0, 0},
  {&__pyx_kp_u_d_th_tetrahedron_in_obj1, __pyx_k_d_th_tetrahedron_in_obj1, sizeof(__pyx_k_d_th_tetrahedron_in_obj1), 0, 1, 0, 0},
  {&__pyx_kp_u_ddx1_ddx2, __pyx_k_ddx1_ddx2, sizeof(__pyx_k_ddx1_ddx2), 0, 1, 0, 0},
  {&__pyx_kp_u_ddy1_ddy2, __pyx_k_ddy1_ddy2, sizeof(__pyx_k_ddy1_ddy2), 0, 1, 0, 0},
  {&__pyx_kp_u_ddz1_ddz2, __pyx_k_ddz1_ddz2, sizeof(__pyx_k_ddz1_ddz2), 0, 1, 0, 0},
  {&__pyx_n_s_dummy, __pyx_k_dummy, sizeof(__pyx_k_dummy), 0, 0, 1, 1},
  {&__pyx_kp_u_error_in_decomposition, __pyx_k_error_in_decomposition, sizeof(__pyx_k_error_in_decomposition), 0, 1, 0, 0},
  {&__pyx_n_s_flag1, __pyx_k_flag1, sizeof(__pyx_k_flag1), 0, 0, 1, 1},
  {&__pyx_n_s_flag2, __pyx_k_flag2, sizeof(__pyx_k_flag2), 0, 0, 1, 1},
  {&__pyx_n_s_flag3, __pyx_k_flag3, sizeof(__pyx_k_flag3), 0, 0, 1, 1},
  {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_intersecting_point, __pyx_k_intersecting_point, sizeof(__pyx_k_intersecting_point), 0, 0, 1, 1},
  {&__pyx_kp_u_intersection_segment_surface, __pyx_k_intersection_segment_surface, sizeof(__pyx_k_intersection_segment_surface), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_tetrahedron_obj_4, __pyx_k_intersection_tetrahedron_obj_4, sizeof(__pyx_k_intersection_tetrahedron_obj_4), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_two_obj, __pyx_k_intersection_two_obj, sizeof(__pyx_k_intersection_two_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_two_obj_convex, __pyx_k_intersection_two_obj_convex, sizeof(__pyx_k_intersection_two_obj_convex), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_two_segment, __pyx_k_intersection_two_segment, sizeof(__pyx_k_intersection_two_segment), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_two_tetrahedron_4, __pyx_k_intersection_two_tetrahedron_4, sizeof(__pyx_k_intersection_two_tetrahedron_4), 0, 1, 0, 0},
  {&__pyx_kp_u_intersection_using_tetrahedron, __pyx_k_intersection_using_tetrahedron, sizeof(__pyx_k_intersection_using_tetrahedron), 0, 1, 0, 0},
  {&__pyx_kp_u_line_segment_and_triangle_are_p, __pyx_k_line_segment_and_triangle_are_p, sizeof(__pyx_k_line_segment_and_triangle_are_p), 0, 1, 0, 0},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_kp_u_number_of_points_for_tetrahedra, __pyx_k_number_of_points_for_tetrahedra, sizeof(__pyx_k_number_of_points_for_tetrahedra), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_tetrahedron_d, __pyx_k_number_of_tetrahedron_d, sizeof(__pyx_k_number_of_tetrahedron_d), 0, 1, 0, 0},
  {&__pyx_kp_u_numbre_of_points_3d, __pyx_k_numbre_of_points_3d, sizeof(__pyx_k_numbre_of_points_3d), 0, 1, 0, 0},
  {&__pyx_kp_u_numbre_of_tetrahedra_3d, __pyx_k_numbre_of_tetrahedra_3d, sizeof(__pyx_k_numbre_of_tetrahedra_3d), 0, 1, 0, 0},
  {&__pyx_kp_u_numerical_value_10_8f, __pyx_k_numerical_value_10_8f, sizeof(__pyx_k_numerical_value_10_8f), 0, 1, 0, 0},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
  {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_obj1, __pyx_k_obj1, sizeof(__pyx_k_obj1), 0, 0, 1, 1},
  {&__pyx_kp_u_obj1_volume, __pyx_k_obj1_volume, sizeof(__pyx_k_obj1_volume), 0, 1, 0, 0},
  {&__pyx_n_s_obj2, __pyx_k_obj2, sizeof(__pyx_k_obj2), 0, 0, 1, 1},
  {&__pyx_kp_u_obj2_volume, __pyx_k_obj2_volume, sizeof(__pyx_k_obj2_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_out_of_expected, __pyx_k_out_of_expected, sizeof(__pyx_k_out_of_expected), 0, 1, 0, 0},
  {&__pyx_n_s_point, __pyx_k_point, sizeof(__pyx_k_point), 0, 0, 1, 1},
  {&__pyx_n_s_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_kp_u_rough_intersection_check_no_int, __pyx_k_rough_intersection_check_no_int, sizeof(__pyx_k_rough_intersection_check_no_int), 0, 1, 0, 0},
  {&__pyx_kp_u_s_8_6f, __pyx_k_s_8_6f, sizeof(__pyx_k_s_8_6f), 0, 1, 0, 0},
  {&__pyx_n_s_scipy_spatial, __pyx_k_scipy_spatial, sizeof(__pyx_k_scipy_spatial), 0, 0, 1, 1},
  {&__pyx_kp_u_segment_1, __pyx_k_segment_1, sizeof(__pyx_k_segment_1), 0, 1, 0, 0},
  {&__pyx_kp_u_segment_2, __pyx_k_segment_2, sizeof(__pyx_k_segment_2), 0, 1, 0, 0},
  {&__pyx_n_s_simplices, __pyx_k_simplices, sizeof(__pyx_k_simplices), 0, 0, 1, 1},
  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_kp_u_t_8_6f, __pyx_k_t_8_6f, sizeof(__pyx_k_t_8_6f), 0, 1, 0, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_u_tetrahedralization, __pyx_k_tetrahedralization, sizeof(__pyx_k_tetrahedralization), 0, 1, 0, 0},
  {&__pyx_kp_u_tetrahedralization_1, __pyx_k_tetrahedralization_1, sizeof(__pyx_k_tetrahedralization_1), 0, 1, 0, 0},
  {&__pyx_kp_u_tetrahedralization_points, __pyx_k_tetrahedralization_points, sizeof(__pyx_k_tetrahedralization_points), 0, 1, 0, 0},
  {&__pyx_kp_u_tetrahedron, __pyx_k_tetrahedron, sizeof(__pyx_k_tetrahedron), 0, 1, 0, 0},
  {&__pyx_n_s_tetrahedron_1, __pyx_k_tetrahedron_1, sizeof(__pyx_k_tetrahedron_1), 0, 0, 1, 1},
  {&__pyx_n_s_tetrahedron_2, __pyx_k_tetrahedron_2, sizeof(__pyx_k_tetrahedron_2), 0, 0, 1, 1},
  {&__pyx_n_s_tetrahedron_2_2, __pyx_k_tetrahedron_2_2, sizeof(__pyx_k_tetrahedron_2_2), 0, 0, 1, 1},
  {&__pyx_kp_u_th_tet_volume, __pyx_k_th_tet_volume, sizeof(__pyx_k_th_tet_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_th_tetrahedron_in_obj1, __pyx_k_th_tetrahedron_in_obj1, sizeof(__pyx_k_th_tetrahedron_in_obj1), 0, 1, 0, 0},
  {&__pyx_kp_u_th_tetrahedron_in_obj2, __pyx_k_th_tetrahedron_in_obj2, sizeof(__pyx_k_th_tetrahedron_in_obj2), 0, 1, 0, 0},
  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_kp_u_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_numerical_value, __pyx_k_volume_numerical_value, sizeof(__pyx_k_volume_numerical_value), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_of_initial_tetrahedron, __pyx_k_volume_of_initial_tetrahedron, sizeof(__pyx_k_volume_of_initial_tetrahedron), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_of_initial_tetrahedron_2, __pyx_k_volume_of_initial_tetrahedron_2, sizeof(__pyx_k_volume_of_initial_tetrahedron_2), 0, 1, 0, 0},
  {&__pyx_kp_u_z1_z2, __pyx_k_z1_z2, sizeof(__pyx_k_z1_z2), 0, 1, 0, 0},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 79, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 947, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pyqcstrc/icosah/intsct.pyx":79
 * 
 *     if verbose>0:
 *         print('     intersection_two_obj_convex')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_intersection_two_obj_convex); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "pyqcstrc/icosah/intsct.pyx":231
 *     """
 *     if verbose>0:
 *         print('     intersection_two_obj()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_intersection_two_obj); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pyqcstrc/icosah/intsct.pyx":239
 *         if rough_check_intersection_two_obj(obj1,obj2)==1:
 *             if verbose>0:
 *                 print('      rough intersection check, no intersection, skip')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_rough_intersection_check_no_int); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "pyqcstrc/icosah/intsct.pyx":421
 * 
 *     if verbose>0:
 *         print('      intersection_using_tetrahedron_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_intersection_using_tetrahedron); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "pyqcstrc/icosah/intsct.pyx":550
 *         else: # if common part (obj1_reduced and obj2) is NOT empty
 *             if verbose>1:
 *                 print('                 common part, empty')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_common_part_empty); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "pyqcstrc/icosah/intsct.pyx":588
 * 
 *     if verbose>0:
 *         print('      intersection_tetrahedron_obj_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_intersection_tetrahedron_obj_4); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "pyqcstrc/icosah/intsct.pyx":651
 *                 pass
 *             #tmp1b=tetrahedron.reshape(72)
 *             tmp4_common=tetrahedron.reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             if vol3<vol1:
 */
  __pyx_tuple__13 = PyTuple_Pack(4, __pyx_int_1, __pyx_int_4, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "pyqcstrc/icosah/intsct.pyx":678
 *         else:
 *             if verbose>0:
 *                 print('        common part, empty')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_common_part_empty_2); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "pyqcstrc/icosah/intsct.pyx":706
 * 
 *     if verbose>0:
 *         print('        intersection_two_tetrahedron_4()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_intersection_two_tetrahedron_4); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "pyqcstrc/icosah/intsct.pyx":976
 * 
 *     if verbose>0:
 *         print('          intersection_segment_surface()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_intersection_segment_surface); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pyqcstrc/icosah/intsct.pyx":1039
 *     if f1==0 and f2==0:
 *         if verbose>1:
 *             print('          line segment and triangle are parallel')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_line_segment_and_triangle_are_p); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "pyqcstrc/icosah/intsct.pyx":1163
 * 
 *     if verbose>0:
 *         print('           intersection_two_segment()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_intersection_two_segment); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "pyqcstrc/icosah/intsct.pyx":1358
 * 
 *     if verbose>0:
 *         print('           tetrahedralization_points()')             # <<<<<<<<<<<<<<
 *         print('            N of points: %3d :'%(len(points)))
 *     else:
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_tetrahedralization_points); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "pyqcstrc/icosah/intsct.pyx":1392
 *         counter=0
 *         for i in range(len(ltmp)):
 *             tmp3b=np.array([tmp3a[ltmp[i][0]],tmp3a[ltmp[i][1]],tmp3a[ltmp[i][2]],tmp3a[ltmp[i][3]]]).reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             #print 'tmp3b',tmp3b
 *             v1,v2,v3=tetrahedron_volume_6d(tmp3b)
 */
  __pyx_tuple__20 = PyTuple_Pack(3, __pyx_int_4, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "pyqcstrc/icosah/intsct.pyx":1449
 * 
 *     if verbose>0:
 *         print('    tetrahedralization_1()')             # <<<<<<<<<<<<<<
 *         v1,v2,v3=obj_volume_6d(obj)     # check volume of 'tetrahedron'
 *         print('      volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_tetrahedralization_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pyqcstrc/icosah/intsct.pyx":1464
 *     if counter1!=0:
 *         if verbose>0:
 *             print('      added point is inside obj')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_added_point_is_inside_obj); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "pyqcstrc/icosah/intsct.pyx":1477
 *     else:
 *         if verbose>0:
 *             print('      added point is out of obj')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_added_point_is_out_of_obj); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "pyqcstrc/icosah/intsct.pyx":1500
 *     #
 *     if verbose>0:
 *         print('           tetrahedralization()')             # <<<<<<<<<<<<<<
 *         v1,v2,v3=tetrahedron_volume_6d(tetrahedron)     # check volume of 'tetrahedron'
 *         print('            volume of initial tetrahedron: %d %d %d'%(v1,v2,v3))
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_tetrahedralization); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "pyqcstrc/icosah/intsct.pyx":1575
 *         tri=Delaunay(tmp2v)
 *     except:
 *         print('error in decomposition()')             # <<<<<<<<<<<<<<
 *         tmp=[0]
 *     else:
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_error_in_decomposition); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "pyqcstrc/icosah/intsct.pyx":1602
 *         else:
 *             tmp1a=np.array([v1,v2,v3])
 *     return tmp1a.reshape(6,3)             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":947
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":953
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "pyqcstrc/icosah/intsct.pyx":18
 * DTYPE_int = int
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray intersection_line_segment_triangle(np.ndarray[DTYPE_int_t, ndim=3] line_segment,
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_int_5); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("intersection_two_obj", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("intersection_two_obj_convex", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_obj_convex, "PyObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tetrahedralization", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tetrahedralization_1", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_1, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tetrahedralization_points", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points, "PyArrayObject *(PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("intersection_using_tetrahedron_4", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("intersection_two_tetrahedron_4", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("intersection_tetrahedron_obj_4", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("pyqcstrc.icosah.math1"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "projection", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_projection, "PyObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "coplanar_check", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check, "int (PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "det_matrix", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_det_matrix, "PyObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "dot_product", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_dot_product, "PyObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "centroid", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_centroid, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "add", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_add, "PyObject *(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "sub", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_sub, "PyObject *(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "mul", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_mul, "PyObject *(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "div", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_div, "PyObject *(__pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, __pyx_t_8pyqcstrc_6icosah_5math1_DTYPE_int_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyqcstrc.icosah.numericalc"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "obj_volume_6d_numerical", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical, "double (PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "tetrahedron_volume_6d_numerical", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical, "double (PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "inside_outside_tetrahedron", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron, "int (PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyqcstrc.icosah.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "generator_surface_1", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1, "PyArrayObject *(PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "generator_edge", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge, "PyArrayObject *(PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "obj_volume_6d", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d, "PyObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "tetrahedron_volume_6d", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d, "PyObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "remove_doubling_dim4_in_perp_space", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "remove_doubling_dim3_in_perp_space", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#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 initintsct(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initintsct(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_intsct(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_intsct(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;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    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;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_intsct(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_3;
  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 'intsct' 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
  #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_intsct(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("intsct", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pyqcstrc__icosah__intsct) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pyqcstrc.icosah.intsct")) {
      if (unlikely(PyDict_SetItemString(modules, "pyqcstrc.icosah.intsct", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_init_code();
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "pyqcstrc/icosah/intsct.pyx":5
 * # Copyright (c) 2021 Tsunetomo Yamada <tsunetomo.yamada@rs.tus.ac.jp>
 * #
 * import sys             # <<<<<<<<<<<<<<
 * import numpy as np
 * from scipy.spatial import Delaunay
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":6
 * #
 * import sys
 * import numpy as np             # <<<<<<<<<<<<<<
 * from scipy.spatial import Delaunay
 * cimport numpy as np
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":7
 * import sys
 * import numpy as np
 * from scipy.spatial import Delaunay             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport cython
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Delaunay);
  __Pyx_GIVEREF(__pyx_n_s_Delaunay);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Delaunay);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_scipy_spatial, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Delaunay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Delaunay, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":15
 * from pyqcstrc.icosah.utils cimport obj_volume_6d, tetrahedron_volume_6d, remove_doubling_dim3_in_perp_space, remove_doubling_dim4_in_perp_space, generator_edge, generator_surface_1
 * 
 * DTYPE_double = np.float64             # <<<<<<<<<<<<<<
 * DTYPE_int = int
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE_double, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/intsct.pyx":16
 * 
 * DTYPE_double = np.float64
 * DTYPE_int = int             # <<<<<<<<<<<<<<
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE_int, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 16, __pyx_L1_error)

  /* "pyqcstrc/icosah/intsct.pyx":18
 * DTYPE_int = int
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray intersection_line_segment_triangle(np.ndarray[DTYPE_int_t, ndim=3] line_segment,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_t_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_2, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_8pyqcstrc_6icosah_6intsct_TAU = __pyx_t_3;

  /* "pyqcstrc/icosah/intsct.pyx":1
 * #             # <<<<<<<<<<<<<<
 * # PyQCstrc - Python tools for Quasi-Crystal structure
 * # Copyright (c) 2021 Tsunetomo Yamada <tsunetomo.yamada@rs.tus.ac.jp>
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../../../../usr/local/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pyqcstrc.icosah.intsct", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyqcstrc.icosah.intsct");
  }
  __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
}

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

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

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        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;
}

/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t <= '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case '?': return "'bool'";
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number, ndim;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    ndim = ctx->head->field->type->ndim;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* BufferGetAndValidate */
  static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (unlikely(info->buf == NULL)) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}
static void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static int __Pyx__GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  buf->buf = NULL;
  if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
    __Pyx_ZeroBuffer(buf);
    return -1;
  }
  if (unlikely(buf->ndim != nd)) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if (unlikely((size_t)buf->itemsize != dtype->size)) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_SafeReleaseBuffer(buf);
  return -1;
}

/* GetItemInt */
  static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!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 {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ExtTypeTest */
  static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* BufferFallbackError */
  static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_SetString(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

/* PyErrFetchRestore */
  #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *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

/* PyObjectCall */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* 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
    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;
    }
#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
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;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
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_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    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
#endif

/* PyCFunctionFastCall */
  #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall2Args */
  static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyIntFromDouble */
  #if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value) {
    if (value >= (double)LONG_MIN && value <= (double)LONG_MAX) {
        return PyInt_FromLong((long)value);
    }
    return PyLong_FromDouble(value);
}
#endif

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

/* 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 **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__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;
                    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;
        }
    }
    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:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* ArgTypeTest */
  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    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;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyObjectCallNoArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* WriteUnraisableException */
  static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED 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();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __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
}

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

/* RaiseNoneIterError */
  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* CIntToDigits */
  static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
  static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
  #ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned short    uint16_t;
        #else
           typedef unsigned __int16  uint16_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define GCC_DIAGNOSTIC
#endif
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyObjectFormat */
  #if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* JoinPyUnicode */
  static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* CIntToPyUnicode */
  #ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned short    uint16_t;
        #else
           typedef unsigned __int16  uint16_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define GCC_DIAGNOSTIC
#endif
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* ObjectGetItem */
  #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    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)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyObjectFormatAndDecref */
  static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* GetTopmostException */
  #if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == 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
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    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

/* 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, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_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;
        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;
    }
    #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;
}

/* 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) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* RaiseException */
  #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    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 CYTHON_COMPILING_IN_PYPY
        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);
#else
        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);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* TypeImport */
  #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Import */
  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!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 (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    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)) {
        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;
}

/* PyFloatBinop */
  #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace;
    (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
        a = PyFloat_AS_DOUBLE(op1);
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0; break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
            
        }
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntBinop */
    #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)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 + 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
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            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;
        double b = PyFloat_AS_DOUBLE(op2);
            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

/* CLineInTraceback */
    #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    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_GetAttrStr(__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;
        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 */
    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);
}

/* AddTraceback */
    #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        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);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_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);
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
    PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
    view->obj = NULL;
    Py_DECREF(obj);
}
#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;\
    }

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    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;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    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;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* Declarations */
    #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
    #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = (float)(1.0) / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = (float)(1.0) / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
    #if CYTHON_CCOMPLEX
  #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
#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) {
                    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

/* CIntFromPy */
    static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    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
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                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
            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
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                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
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            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 one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (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;
}

/* CIntFromPy */
    static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    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
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                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
            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
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                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
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            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 one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (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;
}

/* FastTypeChecks */
    #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        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);
}
#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) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#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

/* CheckBinaryVersion */
    static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionExport */
    static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* FunctionImport */
    #ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
    static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
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) || (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) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_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
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      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 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);
}


#endif /* Py_PYTHON_H */
